Spaces:
Runtime error
Runtime error
File size: 943 Bytes
2e9ea78 658dbbd c90fe2b d8529e7 c90fe2b 0c2babc 53ce00a c90fe2b d8529e7 53ce00a c90fe2b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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๊ฐ ๋ฌด์์ธ๊ฐ์? ๋ํํด๋ณด๋ฉฐ ๋ง์ถฐ๋ณด์ธ์!", "์๋ก์ ์ทจ๋ฏธ๋ฅผ ํ ๊ฐ์ง์ฉ ๊ณต์ ํด๋ณผ๊น์?", "๋์ด๋๊ฐ ์ด๋ป๊ฒ ๋์ธ์? ๋๊ฐ์ด ์๋์ง ์ฐพ์๋ณผ๊น์?",
"์๋ก ์ด๋ฆ ๋์ ๋๋ค์์ ํ๋ ์ ํด์ ๋ถ๋ฌ๋ณผ๊น์?"]
@bp.route("/", methods=["GET"])
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)
|