CSV-Datei wird jetzt in der search-Funktion geladen
This commit is contained in:
5
app.py
5
app.py
@@ -42,6 +42,11 @@ def index():
|
||||
@app.route('/search')
|
||||
def search():
|
||||
try:
|
||||
# CSV-Datei laden
|
||||
df = load_data()
|
||||
if df is None:
|
||||
return jsonify({"error": "Datenbank konnte nicht geladen werden"}), 500
|
||||
|
||||
# Suchparameter aus der URL holen
|
||||
name = request.args.get('name', '').strip()
|
||||
ort = request.args.get('ort', '').strip()
|
||||
|
Reference in New Issue
Block a user