From a3c6bea8b4442dd6cc76b28609e1561ee7a88d83 Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 20 Apr 2026 14:20:29 +0200 Subject: [PATCH 1/7] Fix route usage and add link to new pages in footer --- app.py | 27 +++++++++---------- .../RL3/explore_our_work.html | 2 +- impact.html => templates/RL3/impact.html | 2 +- training.html => templates/RL3/training.html | 2 +- templates/base.html | 3 +++ 5 files changed, 18 insertions(+), 18 deletions(-) rename exploreourwork.html => templates/RL3/explore_our_work.html (98%) rename impact.html => templates/RL3/impact.html (98%) rename training.html => templates/RL3/training.html (97%) diff --git a/app.py b/app.py index 7633d32..e304afa 100644 --- a/app.py +++ b/app.py @@ -20,10 +20,10 @@ ################################################################################ CACHE_TIMEOUT = 60 * 60 * 24 * 5 # 5 days -- [Ozan] I created a separate - # timeout object for the tools page because - # a 5-day caching is too long for it. +# timeout object for the tools page because +# a 5-day caching is too long for it. CACHE_TIMEOUT_SERVICE = 60 # Separate timeout for the tools page -- 60 - # seconds. +# seconds. ### Configuration for BioStudies Integration # Change these variables to switch between collections BIOSTUDIES_COLLECTION = "VHP4Safety" # Replace with "EU-ToxRisk" to test @@ -131,7 +131,7 @@ def get_json_dict(url: str, timeout: int = 5) -> dict: return {} -# A separate get_json_dict function for the tools page with its own timeout. +# A separate get_json_dict function for the tools page with its own timeout. @cache.memoize(timeout=CACHE_TIMEOUT_SERVICE) def get_json_dict_service(url: str, timeout: int = 5) -> dict: """Fetch xxxx_index.json from the cloud repo and return as a dictionary. @@ -319,7 +319,7 @@ def sitemap(): """; return Response(sitemapContent, mimetype='text/xml'); - + ################################################################################ ### Pages under 'Data' @app.route("/data") @@ -401,7 +401,6 @@ def data(): reg_question_explanations=REG_QUESTION_EXPLANATIONS, ) - ################################################################################ ### DataSet detail view @@ -857,25 +856,25 @@ def tool_page(toolname): return render_template( "tools/tool.html", tool_json=tools[toolname], tool_details=tool_details ) - - + + ################################################################################ ### Pages under 'Implementation' # General Explore our work -@app.route("/exploreourwork") -def exploreourwork(): - return render_template("exploreourwork.html") +@app.route("/explore_our_work") +def explore_our_work(): + return render_template("RL3/explore_our_work.html") # General Training @app.route("/training") def training(): - return render_template("training.html") + return render_template("RL3/training.html") # General Impact @app.route("/impact") def impact(): - return render_template("impact.html") + return render_template("RL3/impact.html") ################################################################################ ### Pages under 'Process Flow' @@ -1168,5 +1167,3 @@ def privacy_policy(): if __name__ == "__main__": app.run(host="0.0.0.0", port=5050, debug=True) - - \ No newline at end of file diff --git a/exploreourwork.html b/templates/RL3/explore_our_work.html similarity index 98% rename from exploreourwork.html rename to templates/RL3/explore_our_work.html index ff83087..cd99b87 100644 --- a/exploreourwork.html +++ b/templates/RL3/explore_our_work.html @@ -17,7 +17,7 @@