Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask pass list to another view

from flask import session

#You could also store the list in the session:
session['my_list'] = some_list
return redirect(url_for('show_list'))

#Then in the template:
{% for item in session.pop('my_list', []) %}
    {{ item }}
{% endfor %}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #pass #list #view
ADD COMMENT
Topic
Name
6+6 =