Spaces:
Runtime error
Runtime error
File size: 499 Bytes
c90fe2b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from flask import Blueprint, render_template, redirect, url_for
import random
import time
bp = Blueprint("topic", __name__, url_prefix="topic")
topics = ["MBTI", ""]
@bp.route("/", methods=["GET"])
def topic() -> None:
if session.get("quiz_generated"):
return redirect(url_for("quiz.show_quiz"))
else:
selected_topic = random.choice(topics)
time.sleep(20) # 20์ด ๋๊ธฐ ํ ๋ค์ ์ฃผ์ ๋ก
return render_template("topic.html", topic=selected_topic)
|