November 2015
Beginner to intermediate
840 pages
26h 30m
English
StartupForm, NewsLinkForm, and PostFormThe process for building our templates is very straightforward. We begin by inheriting our app base template, and then override the title and content blocks. In our content block, we must:
1. create an HTML form tag
2. invoke the creation of the CSRF tag via {% csrf_token %}
3. display the form variable passed to the template RequestContext
4. display a submit button.
If we follow the steps above, our template for StartupForm, coded in /organizer/templates/organizer/startup_form.html, will look like the code in Example 8.32.
Example 8.32: Project Code
organizer/templates/organizer/startup_form.html in 42175702d5
1 {% extends parent_template
Read now
Unlock full access