mirror of
https://github.com/Xevion/thedrank.com.git
synced 2025-12-14 14:13:23 -06:00
viewcount fix 2
This commit is contained in:
@@ -3,11 +3,12 @@ from flask import render_template
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
i = int(open(os.path.join('app', 'static', 'viewcount.dat'), 'r').read())
|
viewcountpath = os.path.join('app', 'static', 'viewcount.dat')
|
||||||
|
i = int(open(viewcountpath, 'r').read())
|
||||||
def getIncrement(n=1):
|
def getIncrement(n=1):
|
||||||
global i
|
global i
|
||||||
i += n
|
i += n
|
||||||
open(os.path.join, 'w').write(str(i))
|
open(viewcountpath, 'w').write(str(i))
|
||||||
return i
|
return i
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
|
|||||||
Reference in New Issue
Block a user