Skip to content

Instantly share code, notes, and snippets.

@haraonline
Created January 4, 2019 23:59
Show Gist options
  • Save haraonline/e6fde04118483432e31aa6812e30fc1c to your computer and use it in GitHub Desktop.
Save haraonline/e6fde04118483432e31aa6812e30fc1c to your computer and use it in GitHub Desktop.
# python code for SECTION 3: LECTURE 16
# JINJA2 - MACROS
@app.route('/macros')
def jinja_macros():
movies_dict = {'autopsy of jane doe': 02.14,
'neon demon': 3.20,
'ghost in a shell': 1.50,
'kong: skull island': 3.50,
'john wick 2': 02.52,
'spiderman - homecoming': 1.48}
return render_template('using_macros.html', movies=movies_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment