<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>{{ user.username }}'s Watchlist</title> </head> <body> <a href="{{ url_for('index') }}">← Return</a> <h2>{{ user.username }}</h2> {% if user.bio %} <i>{{ user.bio }}</i> {% else %} <i>This user has not provided a bio.</i> {% endif %} {# Below is the movie list (this is comment) #} <h5>{{ user.username }}'s Watchlist ({{ movies|length }}):</h5> <ul> {% for movie in movies %} <li>{{ movie.name }} - {{ movie.year }}</li> {% endfor %} </ul> </body> </html>
return render_tempalte('wxxx.html',user=user)
{% set navigation=['a','b','c'] %}
app.context_processor(lambda:dict(foo='abcde'))
app.context_processor(lambda:range(1,10))
@app.template_global() def bar(): return 'i am bar'
{{ url_for('index') }} {% if xx %} {% else %} {% endif %}