From 7ca90b2006c3de458ac075daeede1b955131d704 Mon Sep 17 00:00:00 2001
From: Edward Betts
Date: Fri, 4 Oct 2019 12:16:16 +0100
Subject: [PATCH] Basic user setting
---
app.py | 7 +++++++
templates/next.html | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/app.py b/app.py
index 2bf4480..4996d52 100755
--- a/app.py
+++ b/app.py
@@ -181,6 +181,13 @@ def create_depicts_item(item_id):
def init_profile():
g.profiling = []
+@app.route('/user/settings')
+def user_settings():
+ session['no_find_more'] = not session.get('no_find_more')
+ display = {True: 'on', False: 'off'}[not session['no_find_more']]
+
+ return 'flipped. find more is ' + display
+
@app.route('/save/Q', methods=['POST'])
def save(item_id):
depicts = request.form.getlist('depicts')
diff --git a/templates/next.html b/templates/next.html
index 542ebe0..235eed7 100644
--- a/templates/next.html
+++ b/templates/next.html
@@ -19,6 +19,9 @@
browse paintings
+ {% if session.no_find_more %}
+ find more disabled
+ {% else %}
{% raw %}
@@ -37,6 +40,7 @@
{% endraw %}
+ {% endif %}