from threading import Thread from flask import Flask, render_template from orochi.models import Game app = Flask(__name__) @app.route('/') def index(): game = Game.INSTANCE return render_template('list.html', game=game) @app.route('/admin') def admin(): game = Game.INSTANCE return render_template('list.html', game=game, admin=True) def run_web_server(): Thread(target=lambda: app.run(debug=True, use_reloader=False)).start()