2018-01-12 23:16:10 +01:00
|
|
|
import json
|
|
|
|
import MySQLdb
|
|
|
|
import MySQLdb.cursors
|
2018-01-13 21:39:01 +01:00
|
|
|
from flask import Flask, make_response, request, render_template, jsonify
|
2018-01-12 23:16:10 +01:00
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
with open("config.json", "r") as f:
|
|
|
|
config = json.load(f)
|
|
|
|
|
|
|
|
@app.route("/")
|
2018-01-13 21:39:01 +01:00
|
|
|
@app.route("/home")
|
2018-01-12 23:16:10 +01:00
|
|
|
def home_index():
|
|
|
|
return render_template("index.html")
|
|
|
|
|
2018-01-13 21:39:01 +01:00
|
|
|
@app.route("/download")
|
|
|
|
def download_index():
|
|
|
|
return render_template("download.html")
|
|
|
|
|
2018-01-12 23:16:10 +01:00
|
|
|
if __name__ == "__main__":
|
|
|
|
app.run(**config["web"])
|