22 lines
427 B
Python
22 lines
427 B
Python
from flask import Flask, render_template, jsonify, redirect, url_for
|
|
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():
|
|
return jsonify(data)
|
|
|
|
@app.route('/submit')
|
|
def submit():
|
|
return redirect(url_for('index'))
|
|
|