From 8fa23e5e1989d0a5c73c4c43eea7d76afaade1c4 Mon Sep 17 00:00:00 2001
From: Edward Betts
Date: Fri, 27 Sep 2019 15:35:26 +0100
Subject: [PATCH] Fix browse index.
---
app.py | 11 +++++------
templates/item.html | 2 +-
templates/property.html | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/app.py b/app.py
index 740bf36..2c395b3 100755
--- a/app.py
+++ b/app.py
@@ -119,12 +119,6 @@ def set_url_args(**new_args):
def init_profile():
g.profiling = []
-@app.route("/browse")
-def browse_index():
- return render_template('browse_index.html',
- props=find_more_props,
- username=get_username())
-
@app.route("/property/P")
def property_query_page(property_id):
pid = f'P{property_id}'
@@ -455,6 +449,11 @@ def browse_page():
params = [(pid, qid) for pid, qid in request.args.items()
if pid.startswith('P') and qid.startswith('Q')]
+ if not params:
+ return render_template('browse_index.html',
+ props=find_more_props,
+ username=get_username())
+
flat = '_'.join(f'{pid}={qid}' for pid, qid in params)
# item_entity = get_entity_with_cache(qid)
diff --git a/templates/item.html b/templates/item.html
index 37d9cec..e5d87f6 100644
--- a/templates/item.html
+++ b/templates/item.html
@@ -19,7 +19,7 @@
|
switch to another painting
|
- browse paintings
+ browse paintings
diff --git a/templates/property.html b/templates/property.html
index d984c93..842f1e2 100644
--- a/templates/property.html
+++ b/templates/property.html
@@ -6,7 +6,7 @@