플라스크 애플리케이션을 만들고 있는데, 경로 템플릿을 렌더링 할 수 있는지 궁금 해서요, 기능 완료 후 사용자를 리디렉션합니다. 현재 Python 2.7을 사용하고 있습니다 여기에 내 예가 있습니다플라스크 - 비동기 적으로 템플릿 렌더링
@app.route('/loading/matched')
def match():
time_match()
return render_template('matched.html')
def time_match():
# match two users based on time
sleep(3) # pretend to be doing
return redirect('/loading/generation')
어디서부터 시작 해야할지 모르겠습니다. 내가 사용해야하는 도서관이 있습니까?
즉, 렌더링 된 템플릿). – dirn