From e022b49a925c7912180a9221a7c347a28e0614df Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 30 Jan 2022 23:42:38 +1100 Subject: [PATCH] remove old route for /search and fix issue where searching for empty string was failing --- files.py | 9 --------- templates/base.html | 13 +++++++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/files.py b/files.py index 9683f6c..58e3fce 100644 --- a/files.py +++ b/files.py @@ -505,15 +505,6 @@ def search(search_term): move_paths = MovePathDetails() return render_template("files.html", page_title='View Files', search_term=search_term, entry_data=entries, OPT=OPT, move_paths=move_paths ) -################################################################################ -# /search -> POST version -> only used on form submit when you hit return. This -# form just redirects to a GET of /search/ to trip route above -################################################################################ -@app.route("/search", methods=["POST"]) -@login_required -def search_post(): - return redirect( "/search/"+request.form['search_term'] ) - ################################################################################ # /files/scannow -> allows us to force a check for new files ################################################################################ diff --git a/templates/base.html b/templates/base.html index 23e9f53..e4f8cb9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,6 +25,15 @@ .highlight { box-shadow: 0 0 7px 4px #5bc0de } .sm-txt { font-size: 0.7rem } + @@ -103,9 +112,9 @@ -
+ - +