From 19c1d989f3d5a7e55b105521696419dd97e44807 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 12 Oct 2024 20:13:27 +0200 Subject: [PATCH] minor changes, better links --- app.py | 9 +++++++++ arztapi/APIHandler.py | 2 -- forms/SearchForm.py | 4 +++- templates/base.html | 2 +- templates/index.html | 10 +++++++++- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 2bc377e..1e8b321 100644 --- a/app.py +++ b/app.py @@ -65,6 +65,15 @@ def search_for_doctors_with_params(): return render_template("result.html", doctors=sorted_doctor_phone_times) +@app.route("/search", methods=["GET"]) +def search_direct(): + return redirect("/") + + @app.route('/about') def about(): return render_template("about.html") + + +if __name__ == "__main__": + app.run() diff --git a/arztapi/APIHandler.py b/arztapi/APIHandler.py index 14f105c..bce6b38 100644 --- a/arztapi/APIHandler.py +++ b/arztapi/APIHandler.py @@ -116,11 +116,9 @@ class APIHandler: cache_data = self.get_current_doctor_information_data_in_cache_with_time_check(amount_of_days) if cache_data: - print("using cached data") self.phone_times = cache_data else: - print("call api") self.get_list_of_doctors_from_api(lat, lon, req_val_base64, therapy_types, therapy_age, therapy_setting) self.set_current_doctor_information_data_in_cache() diff --git a/forms/SearchForm.py b/forms/SearchForm.py index 2425b4b..e438eed 100644 --- a/forms/SearchForm.py +++ b/forms/SearchForm.py @@ -81,4 +81,6 @@ class SearchForm(Form): widget=RangeInput(), default=1, validators=[validators.InputRequired(), validators.NumberRange(min=1, max=4)] - ) \ No newline at end of file + ) + + # TODO: DSE akzeptieren \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 89a5176..f34fa1b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,7 +10,7 @@