templates folder
Copy the templates folder from the completed code package into the Arenas application folder. Inside the templates folder is a folder called arenas, with a template HTML file called index.html. This file contains a JavaScript portion that generates a web map. On that map, the location of an NBA arena is displayed.
Django templates use placeholders (demarcated with a {{form.field }} format) that allow for data to be passed at runtime into the template, providing the specifics of the request. These placeholders are located throughout index.html. Django has its own built-in template language, which we will use here, and also includes Jinja2, which Flask also uses (see Chapter 11, Flask and GeoAlchemy2).
The first portion of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access