Changed history display method
This commit is contained in:
@@ -26,13 +26,13 @@ def index():
|
||||
@app.route('/status')
|
||||
@requires_auth
|
||||
def somehtml():
|
||||
history = []
|
||||
with open('history.json', 'r') as json_data:
|
||||
history = json.load(json_data)
|
||||
history = history[-15:]
|
||||
for event in history:
|
||||
event['time'] = epochFormat(event['time'])
|
||||
return render_template('status.html', events = history[::-1])
|
||||
#history = []
|
||||
#with open('history.json', 'r') as json_data:
|
||||
# history = json.load(json_data)
|
||||
#history = history[-15:]
|
||||
#for event in history:
|
||||
# event['time'] = epochFormat(event['time'])
|
||||
return render_template('status.html')
|
||||
|
||||
@app.route('/users')
|
||||
@requires_auth
|
||||
@@ -42,7 +42,12 @@ def users():
|
||||
@app.route('/history')
|
||||
@requires_auth
|
||||
def history():
|
||||
return 'You have reached history'
|
||||
return render_template('history.html')
|
||||
|
||||
@app.route('/gethistory')
|
||||
@requires_auth
|
||||
def getHistory():
|
||||
return send_from_directory('.', 'history.json')
|
||||
|
||||
@app.route('/getcardinfo/<cardID>')
|
||||
@requires_auth
|
||||
|
||||
Reference in New Issue
Block a user