From 2e6bbbfbd55a4ed2a6f9e103c503d067d2032223 Mon Sep 17 00:00:00 2001 From: lynzaa <144308467+lynzaa@users.noreply.github.com> Date: Sat, 11 May 2024 20:35:34 +1000 Subject: [PATCH 1/4] Initial --- .../__pycache__/chatbot_logic.cpython-311.pyc | Bin 18337 -> 18343 bytes .../query_bankdata.cpython-311.pyc | Bin 11794 -> 11800 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/neo_dolfin/ai/chatbot/__pycache__/chatbot_logic.cpython-311.pyc b/neo_dolfin/ai/chatbot/__pycache__/chatbot_logic.cpython-311.pyc index ad6a1f7b2e4e9b13ec787a938f05b987b4224dff..a9787fe7cd836f375eb1c254981212444e4d2b41 100644 GIT binary patch delta 50 zcmZ43&$zswk!LwCFBbz4WZK!MZRDBHA{wqATAW%`te=yaSDBSxoSK-EnOMAe7t3=e E0C!9f*#H0l delta 44 ycmZ49&$zIkk!LwCFBbz4%zImwx{+r-3xA+~XmM&$v3_wzVqU6V%H{(s&z%4_1rHYh diff --git a/neo_dolfin/ai/chatbot/__pycache__/query_bankdata.cpython-311.pyc b/neo_dolfin/ai/chatbot/__pycache__/query_bankdata.cpython-311.pyc index 9acbfbfde3fa9ee1e40442f7d33be30397e71c18..161ff33c13988b5f94eb2bb47682cea3eb24f104 100644 GIT binary patch delta 47 zcmbOfGb4t3IWI340}!O7yxYia&LkS4A6lGRRIHzqnOB*WU!0nllbKk&Igsg~HUL)v B52^qF delta 41 vcmbOcGbx69IWI340}#x6TegwgoQXe3KeRZts93)^BQY;kFJ*H$(?M+j1ECEW From e650887fdd3ec85f80f24452e4516564e5b857de Mon Sep 17 00:00:00 2001 From: lynzaa <144308467+lynzaa@users.noreply.github.com> Date: Fri, 17 May 2024 14:50:02 +1000 Subject: [PATCH 2/4] News Routing Fixed Fixed the Read more button route to redirect to the correct article page. --- neo_dolfin/app.py | 23 ++++++++++++++++++----- neo_dolfin/templates/news.html | 9 +++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/neo_dolfin/app.py b/neo_dolfin/app.py index 0666bd7e..de465f34 100644 --- a/neo_dolfin/app.py +++ b/neo_dolfin/app.py @@ -729,11 +729,24 @@ def open_terms_of_use(): @app.route('/terms-of-use-ai/') def open_terms_of_use_AI(): return render_template("TermsofUse-AI.html") - -# APPLICATION Article Template PAGE -@app.route('/articleTemplate/') -def open_article_template(): - return render_template("articleTemplate.html") + +# APPLICATION News Template PAGE +@app.route('/news') +def news_list(): + return render_template("news.html") + +# APPLICATION Article Template PAGE +@app.route('/articles/') +def article_detail(article_id): + with open('./static/json/article.json') as file: + articles = json.load(file) + article = next((a for a in articles if a["id"] == article_id), None) + my_array = [] + my_array.append(article) + if article: + return render_template("articleTemplate.html", articles=my_array) + else: + return "Article not found", 404 @app.route('/feedback', methods=['GET', 'POST']) def feedback(): diff --git a/neo_dolfin/templates/news.html b/neo_dolfin/templates/news.html index d21c8cfa..cff74ebe 100644 --- a/neo_dolfin/templates/news.html +++ b/neo_dolfin/templates/news.html @@ -85,7 +85,8 @@
Top 5 c

10/06/23

@@ -113,7 +114,7 @@
Is savi

01/12/23

@@ -149,7 +150,7 @@
Learn w

08/06/23

@@ -182,7 +183,7 @@
What is

25/07/23

From 19ac575ebdde5ccb8b3640c6834bd811e5adf6f7 Mon Sep 17 00:00:00 2001 From: lynzaa <144308467+lynzaa@users.noreply.github.com> Date: Fri, 17 May 2024 15:31:23 +1000 Subject: [PATCH 3/4] Update app.py Updated script --- neo_dolfin/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neo_dolfin/app.py b/neo_dolfin/app.py index c30d0572..206768ea 100644 --- a/neo_dolfin/app.py +++ b/neo_dolfin/app.py @@ -770,12 +770,19 @@ def auth_survey(): @app.route('/terms-of-use/') def open_terms_of_use(): return render_template("TermsofUse.html") - + + # APPLICATION TERMS OF USE-AI PAGE @app.route('/terms-of-use-ai/') def open_terms_of_use_AI(): return render_template("TermsofUse-AI.html") +# APPLICATION Article Template PAGE +#@app.route('/articleTemplate/') +#def open_article_template(): +# return render_template("articleTemplate.html") + + # APPLICATION News Template PAGE @app.route('/news') def news_list(): From eb7f361e7f6222fc4c1620de3f23c300464b750d Mon Sep 17 00:00:00 2001 From: lynzaa <144308467+lynzaa@users.noreply.github.com> Date: Fri, 17 May 2024 15:56:26 +1000 Subject: [PATCH 4/4] READ MORE UPDATED SCRIPT FOR READ MORE BUTTON ROUTE. --- neo_dolfin/app.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/neo_dolfin/app.py b/neo_dolfin/app.py index 206768ea..555312e5 100644 --- a/neo_dolfin/app.py +++ b/neo_dolfin/app.py @@ -777,18 +777,13 @@ def open_terms_of_use(): def open_terms_of_use_AI(): return render_template("TermsofUse-AI.html") -# APPLICATION Article Template PAGE -#@app.route('/articleTemplate/') -#def open_article_template(): -# return render_template("articleTemplate.html") - -# APPLICATION News Template PAGE +# APPLICATION NEWS TEMPLATE PAGE @app.route('/news') def news_list(): return render_template("news.html") -# APPLICATION Article Template PAGE +# APPLICATION ARTICLE TEMPLATE PAGE @app.route('/articles/') def article_detail(article_id): with open('./static/json/article.json') as file: @@ -801,6 +796,8 @@ def article_detail(article_id): else: return "Article not found", 404 + + @app.route('/feedback', methods=['GET', 'POST']) def feedback(): if request.method == 'POST':