From 46babe1a44480f95201a2184e469da4fcdd8104b Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 27 Sep 2019 16:07:37 +0100 Subject: [PATCH] WIP: save depicts to paintings --- app.py | 6 ++++++ templates/item.html | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/app.py b/app.py index 2c395b3..9faf186 100755 --- a/app.py +++ b/app.py @@ -119,6 +119,11 @@ def set_url_args(**new_args): def init_profile(): g.profiling = [] +@app.route('/save/Q', methods=['POST']) +def save(item_id): + depicts = request.form.getlist('depicts') + return repr(depicts) + @app.route("/property/P") def property_query_page(property_id): pid = f'P{property_id}' @@ -343,6 +348,7 @@ def item_page(item_id): return render_template('item.html', qid=qid, + item_id=item_id, item=item, catalog=catalog, catalog_url=catalog_url, diff --git a/templates/item.html b/templates/item.html index bc06485..040c739 100644 --- a/templates/item.html +++ b/templates/item.html @@ -84,11 +84,17 @@ +
{% raw %}

what can you see in this painting?

+
+
{{ new_depicts.length }} new items to add to painting depicts statement
+
+
+
{{ hit.label }} ({{ hit.alt_label }}) @@ -102,7 +108,10 @@
+ + +
@@ -119,6 +128,7 @@
{% endraw %} +