From c9f5681348413413731f02d2e5b1024753329dde Mon Sep 17 00:00:00 2001 From: peregr1nus Date: Thu, 11 Dec 2025 11:12:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A0=84=20=EC=84=A4=EB=AC=B8=20?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EC=82=B4=EB=A6=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 55 +++++++++++++++++++++++ app.py | 13 ++++-- requirements.txt | 3 ++ static/script.js | 3 ++ templates/auth.html | 3 ++ templates/complete.html | 3 ++ templates/step1.html | 6 +-- templates/step2.html | 48 ++++++++++---------- templates/step3.html | 98 ++++++++++++++++++++--------------------- templates/step4.html | 9 ++-- templates/step5.html | 5 ++- utils/__init__.py | 3 ++ word_templates/.gitkeep | 3 ++ 13 files changed, 167 insertions(+), 85 deletions(-) create mode 100644 .gitignore 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 @@
- +
@@ -27,7 +27,7 @@
@@ -37,7 +37,7 @@ diff --git a/templates/step2.html b/templates/step2.html index 169426e..e258ec2 100644 --- a/templates/step2.html +++ b/templates/step2.html @@ -21,9 +21,9 @@
- - - + + +
@@ -32,9 +32,9 @@
- - - + + +
@@ -43,9 +43,9 @@
- - - + + +
@@ -54,9 +54,9 @@
- - - + + +
@@ -65,9 +65,9 @@
- - - + + +
@@ -76,9 +76,9 @@
- - - + + +
@@ -87,9 +87,9 @@
- - - + + +
@@ -98,9 +98,9 @@
- - - + + +
diff --git a/templates/step3.html b/templates/step3.html index 2146c48..345fde6 100644 --- a/templates/step3.html +++ b/templates/step3.html @@ -21,9 +21,9 @@
- - - + + +
@@ -32,9 +32,9 @@
- - - + + +
@@ -43,9 +43,9 @@
- - - + + +
@@ -54,9 +54,9 @@
- - - + + +
@@ -65,9 +65,9 @@
- - - + + +
@@ -76,9 +76,9 @@
- - - + + +
@@ -94,9 +94,9 @@
- - - + + +
@@ -105,9 +105,9 @@
- - - + + +
@@ -116,9 +116,9 @@
- - - + + +
@@ -127,9 +127,9 @@
- - - + + +
@@ -138,9 +138,9 @@
- - - + + +
@@ -149,9 +149,9 @@
- - - + + +
@@ -160,9 +160,9 @@
- - - + + +
@@ -171,9 +171,9 @@
- - - + + +
@@ -182,9 +182,9 @@
- - - + + +
@@ -193,9 +193,9 @@
- - - + + +
@@ -203,7 +203,7 @@
- +
diff --git a/templates/step4.html b/templates/step4.html index d35a665..e70eb4f 100644 --- a/templates/step4.html +++ b/templates/step4.html @@ -25,10 +25,11 @@ {% if '기타의견란' in question or '기타의견' in question %}

※ 이 문항은 아래 "기타의견"란에 "{{ loop.index }}번: "으로 시작하여 답변해주세요.

{% else %} + {% set q_key = 'q' ~ loop.index %}
- - - + + +
{% endif %} @@ -38,7 +39,7 @@
- +
diff --git a/templates/step5.html b/templates/step5.html index 907f333..f6a6e75 100644 --- a/templates/step5.html +++ b/templates/step5.html @@ -20,7 +20,7 @@

상담 소감을 자유롭게 작성해주세요.

- +
@@ -77,3 +77,6 @@ document.getElementById('step5Form').addEventListener('submit', async function(e {% endblock %} + + + diff --git a/utils/__init__.py b/utils/__init__.py index 13fa07c..21b440f 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -1,2 +1,5 @@ # Utils package + + + diff --git a/word_templates/.gitkeep b/word_templates/.gitkeep index 781f09e..a3582f6 100644 --- a/word_templates/.gitkeep +++ b/word_templates/.gitkeep @@ -1,3 +1,6 @@ # 이 디렉토리에 워드 템플릿 파일을 저장하세요 # 예: 신천지_template.docx, 구원파_template.docx 등 + + +