diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2ce47a5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,55 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +env/ +venv/ +ENV/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# Flask +instance/ +.webassets-cache + +# Environment variables +.env +.venv + +# Google Drive API +credentials.json +token.json + +# Output files +output/ +*.docx + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + + + + diff --git a/app.py b/app.py index 8c2ca44..6ad4d78 100644 --- a/app.py +++ b/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 diff --git a/requirements.txt b/requirements.txt index 5c463b9..ade4e0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,6 @@ google-auth-oauthlib==1.1.0 python-dotenv==1.0.0 Werkzeug==3.0.1 + + + diff --git a/static/script.js b/static/script.js index 0cfdb00..dfdbcb3 100644 --- a/static/script.js +++ b/static/script.js @@ -25,3 +25,6 @@ function hideLoading() { } } + + + diff --git a/templates/auth.html b/templates/auth.html index 371c016..7682c98 100644 --- a/templates/auth.html +++ b/templates/auth.html @@ -27,3 +27,6 @@ {% endblock %} + + + diff --git a/templates/complete.html b/templates/complete.html index 61dee2c..6cb6497 100644 --- a/templates/complete.html +++ b/templates/complete.html @@ -15,3 +15,6 @@ {% endblock %} + + + diff --git a/templates/step1.html b/templates/step1.html index 01baf6d..f668d11 100644 --- a/templates/step1.html +++ b/templates/step1.html @@ -19,7 +19,7 @@