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')

1
app/static/viewcount.dat Normal file
View File

@@ -0,0 +1 @@
0

View File

@@ -1,5 +1,7 @@
<html>
<body>
{{ viewcount }} idiots have bare witness to my worst creation yet
<br>
i don't know how to program html
<br>
Xevion#0001 if you know how tf i can make this meme site real lmao