minor changes, better links

This commit is contained in:
Lea 2024-10-12 20:13:27 +02:00
parent a8e899d92d
commit 19c1d989f3
5 changed files with 22 additions and 5 deletions

9
app.py
View File

@ -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()

View File

@ -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()

View File

@ -82,3 +82,5 @@ class SearchForm(Form):
default=1,
validators=[validators.InputRequired(), validators.NumberRange(min=1, max=4)]
)
# TODO: DSE akzeptieren

View File

@ -10,7 +10,7 @@
<div class="bg-gradient-to-r from-blue-400 via-purple-400 to-pink-400 min-h-screen">
<nav class="navbar bg-primary text-primary-content justify-center items-center text-center">
<div class="flex">
<a class="btn btn-ghost text-xl" href="#">TheraPy</a>
<a class="btn btn-ghost text-xl" href="/">TheraPy</a>
</div>
<div class="flex justify-center mr-auto">
<a class="mx-2" href="/">TheraPy</a>

View File

@ -2,10 +2,18 @@
{% block content %}
<div class="container mx-auto p-4">
<h1 class="text-3xl font-bold mb-6">Suche</h1>
<div class="space-y-2 mb-3 my-6">
<p class="mb-3 text-lg md:text-xl dark:text-gray-400">
TheraPy hilft dir, Telefonzeiten für psychotherapeutische Angebote basierend auf den Daten der 116 117
Arztsuche der kassenärztlichen Vereinigung zu finden.
Mit dem gewünschten Standort und Suchkriterien erhältst du aktuelle Telefonzeiten sortiert nach Datum.
</p>
<h1 class="text-3xl font-bold mb-6 mt-6">Suche</h1>
<form method="POST" action="/search" class="space-y-6">
{{ form.csrf_token }}
<div class="space-y-2">
<label for="locationInput" class="block text-lg font-medium">{{ form.location.label }}</label>
<div class="flex flex-initial items-center space-x-2">