Fix browse index.

This commit is contained in:
Edward Betts 2019-09-27 15:35:26 +01:00
parent f7f29ad1fb
commit 8fa23e5e19
3 changed files with 7 additions and 8 deletions

11
app.py
View file

@ -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<int:property_id>")
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)

View file

@ -19,7 +19,7 @@
|
<a href="{{ url_for('random_painting') }}">switch to another painting</a>
|
<a href="{{ url_for('browse_index') }}">browse paintings</a>
<a href="{{ url_for('browse_page') }}">browse paintings</a>
</p>

View file

@ -6,7 +6,7 @@
<div class="m-3">
<h1>{{ self.title() }}</h1>
<p><a href="{{ url_for('browse_index') }}">back to index</a></p>
<p><a href="{{ url_for('browse_page') }}">back to index</a></p>
<p>Sort order:
{% if order == 'name' %}