Nov 04: Jinja Templates, Charts
Learning Objectives
After today's class, you should be able to:
- Explain the double brace syntax used in a Jinja template.
- Run a web app that renders a template based on a query.
Lesson Outline¶
Jinja Templates [30 min]
- Jinja Templates
- Solution code from Thursday: world.py
- Today's example: imdb.py, imdb.jinja
Google Charts [25 min]
- Chart Gallery – where you can get templates!
- Table Chart example: flight.py, flight.jinja
GP5 Preview [20 min]
- Customize the front page; add "about" page
- At least one form (Ex: propose a workshop)
- The form should do an action that updates the db
- One or more charts (for all views that make sense)