From e577bfef5da044bd3609a24dd2995665fa8d1762 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 29 Aug 2023 16:57:32 +0200 Subject: [PATCH] appstore: iterate on search/filters, cosmetics --- store/app.py | 4 +- store/templates/base.html | 2 +- store/templates/catalog.html | 252 ++++++++++++++++++++++------------ store/templates/index.html | 2 +- store/templates/wishlist.html | 2 +- 5 files changed, 171 insertions(+), 91 deletions(-) diff --git a/store/app.py b/store/app.py index c3816f6e..172544d5 100644 --- a/store/app.py +++ b/store/app.py @@ -118,8 +118,8 @@ def index(): @app.route('/catalog') -def browse_catalog(category_filter=None): - return render_template("catalog.html", user=session.get('user', {}), catalog=catalog, timestamp_now=int(time.time())) +def browse_catalog(): + return render_template("catalog.html", init_search=request.args.get("search"), init_category=request.args.get("category"), user=session.get('user', {}), catalog=catalog, timestamp_now=int(time.time())) @app.route('/app/') diff --git a/store/templates/base.html b/store/templates/base.html index 2aa3bf88..f9242db5 100644 --- a/store/templates/base.html +++ b/store/templates/base.html @@ -10,7 +10,7 @@