8.1 Introduction
In this chapter, we build templates to display the Django forms we built in Chapter 7: Allowing User Input with Forms. We start by programming our TagForm template manually in HTML, without any use of the context variables passed to the template. We introduce RequestContext variables and slowly replace pieces of our HTML with these variables (the variables will output exactly what we coded). The first solution we examine requires the most work but affords us the most control. Our final solution requires the least amount of work, but also affords us less control. In between the first and final solutions, we will iterate through a number of options, gradually relinquishing control in favor of less code.
The templates we build ...
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