Basic user setting
This commit is contained in:
parent
478d9c6806
commit
7ca90b2006
7
app.py
7
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<int:item_id>', methods=['POST'])
|
||||
def save(item_id):
|
||||
depicts = request.form.getlist('depicts')
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
<a href="{{ url_for('browse_page') }}">browse paintings</a>
|
||||
</p>
|
||||
|
||||
{% if session.no_find_more %}
|
||||
<p>find more disabled</p>
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
<div id="app">
|
||||
|
@ -37,6 +40,7 @@
|
|||
|
||||
</div>
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue