24 lines
579 B
Python
24 lines
579 B
Python
|
from flask import Flask, render_template
|
||
|
import database
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
app.config.from_pyfile("config.py")
|
||
|
|
||
|
|
||
|
@app.route("/")
|
||
|
def index():
|
||
|
easy = database.get_random_question_of_difficulty(database.HiddenAnswer, 1)
|
||
|
medium = database.get_random_question_of_difficulty(database.HiddenAnswer, 2)
|
||
|
hard = database.get_random_question_of_difficulty(database.HiddenAnswer, 3)
|
||
|
return render_template(
|
||
|
"hidden_answer.html",
|
||
|
title="Home",
|
||
|
easy=easy,
|
||
|
medium=medium,
|
||
|
hard=hard,
|
||
|
)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
app.run()
|