In a template, how do I get what page I\'m currently on? I\'d rather not pass a variable like page , especially when I know some request.xxx can pr
To avoid using hard-coded URLs you can use the url_for function like this:
{% for ni in ['index', 'foo', 'bar', 'baz'] %}
- {{ ni | capitalize }}
{% endfor %}
In this case index, foo, bar and baz would be function names, used like this in your python code:
@app.route('/')
def index():