이전 설문 내용 살리기
This commit is contained in:
13
app.py
13
app.py
@@ -84,9 +84,11 @@ def step1():
|
||||
data = request.get_json()
|
||||
session['basic_info'] = data
|
||||
return jsonify({'success': True, 'next_step': '/step2'})
|
||||
basic_info = session.get('basic_info', {})
|
||||
return render_template('step1.html',
|
||||
districts=app.config['DISTRICTS'],
|
||||
cults=app.config['CULTS'])
|
||||
cults=app.config['CULTS'],
|
||||
basic_info=basic_info)
|
||||
|
||||
@app.route('/step2', methods=['GET', 'POST'])
|
||||
@require_auth
|
||||
@@ -96,7 +98,8 @@ def step2():
|
||||
data = request.get_json()
|
||||
session['methodist_doctrine'] = data
|
||||
return jsonify({'success': True, 'next_step': '/step3'})
|
||||
return render_template('step2.html')
|
||||
methodist_doctrine = session.get('methodist_doctrine', {})
|
||||
return render_template('step2.html', methodist_doctrine=methodist_doctrine)
|
||||
|
||||
@app.route('/step3', methods=['GET', 'POST'])
|
||||
@require_auth
|
||||
@@ -116,7 +119,8 @@ def step3():
|
||||
return jsonify({'success': True, 'next_step': '/step5'})
|
||||
|
||||
return jsonify({'success': True, 'next_step': '/step4'})
|
||||
return render_template('step3.html')
|
||||
general_cult_doctrine = session.get('general_cult_doctrine', {})
|
||||
return render_template('step3.html', general_cult_doctrine=general_cult_doctrine)
|
||||
|
||||
@app.route('/step4', methods=['GET', 'POST'])
|
||||
@require_auth
|
||||
@@ -138,7 +142,8 @@ def step4():
|
||||
if not questions:
|
||||
return redirect(url_for('step5'))
|
||||
|
||||
return render_template('step4.html', cult_name=cult_name, questions=questions)
|
||||
specific_cult_doctrine = session.get('specific_cult_doctrine', {})
|
||||
return render_template('step4.html', cult_name=cult_name, questions=questions, specific_cult_doctrine=specific_cult_doctrine)
|
||||
|
||||
@app.route('/step5', methods=['GET', 'POST'])
|
||||
@require_auth
|
||||
|
||||
Reference in New Issue
Block a user