retro/app.py

22 lines
427 B
Python
Raw Normal View History

2018-08-10 22:20:49 +00:00
from flask import Flask, render_template, jsonify, redirect, url_for
2018-08-10 03:13:15 +00:00
from char import get_stats, data
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/stats')
def _get_stats():
return jsonify(get_stats())
@app.route('/data')
def get_data():
2018-08-10 03:55:23 +00:00
return jsonify(data)
2018-08-10 22:20:49 +00:00
@app.route('/submit')
2018-08-10 03:55:23 +00:00
def submit():
return redirect(url_for('index'))
2018-08-10 03:57:02 +00:00