9.5 Putting It All Together
The end of Chapter 9 is the culmination of the last three chapters. In this chapter, we used the forms from Chapter 7 and the templates from Chapter 8 to create webpages that users can interact with, creating, modifying, and deleting content from the site.
We built webpages to create, update, and delete objects. We saw that when creating a view to use a form to create or update an object, the view must account for the three states a form may exist in. As such, views handling forms are typically also finite-state machines with three states. CBVs become very useful in this case because they make all three states of both the view and the form very simple to understand. Similarly, to properly handle CSRF (by enabling ...
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