Spaces:
Runtime error
Runtime error
from flask import Blueprint, render_template, redirect, url_for, jsonify | |
from flask import session | |
import random | |
from ice_breaking_challenge import quiz_generated | |
import time | |
bp = Blueprint("topic", __name__, url_prefix="/topic") | |
topics = ["๋ฐ๋ง ๋ชจ๋๋ฅผ ํด๋ณด์๋ ๊ฑด ์ด๋ ์ธ์?", "์ค๋ ๋ฎ์ ํ ์ผ์ ๊ณต์ ํด๋ณด์ธ์!", "์์นจํ ์ธ๊ฐ์ธ๊ฐ์, ์ ๋ ํ ์ธ๊ฐ์ธ๊ฐ์?", | |
"MBTI๊ฐ ๋ฌด์์ธ๊ฐ์? ๋ํํด๋ณด๋ฉฐ ๋ง์ถฐ๋ณด์ธ์!", "์๋ก์ ์ทจ๋ฏธ๋ฅผ ํ ๊ฐ์ง์ฉ ๊ณต์ ํด๋ณผ๊น์?", "๋์ด๋๊ฐ ์ด๋ป๊ฒ ๋์ธ์? ๋๊ฐ์ด ์๋์ง ์ฐพ์๋ณผ๊น์?", | |
"์๋ก ์ด๋ฆ ๋์ ๋๋ค์์ ํ๋ ์ ํด์ ๋ถ๋ฌ๋ณผ๊น์?"] | |
def topic() -> None: | |
if quiz_generated[session.sid]: | |
return redirect(url_for("quiz.quiz")) | |
else: | |
selected_topic = random.choice(topics) | |
return render_template("topic.html", topic=selected_topic) | |