viewcounter addition

This commit is contained in:
Xevion
2019-09-22 15:10:43 -05:00
parent 0c5ed80cf7
commit 91bc65134b
3 changed files with 11 additions and 1 deletions

View File

@@ -3,9 +3,16 @@ from flask import render_template
import os
import sys
i = int(open(os.path.join('app', 'static', 'viewcount.dat'), 'r').read())
def getIncrement(n=1):
global i
i += n
open(os.path.join, 'w').write(str(i))
return i
@app.route('/')
def index():
return render_template('index.html')
return render_template('index.html', viewcount=getIncrement())
@app.route('/keybase.txt')
@app.route('/.well-known/keybase.txt')