Spaces:
Runtime error
Runtime error
from flask import Blueprint, render_template, redirect, url_for | |
import random | |
import time | |
bp = Blueprint("topic", __name__, url_prefix="topic") | |
topics = ["MBTI", ""] | |
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) | |