November 2015
Beginner to intermediate
840 pages
26h 30m
English
It’s time to build a webpage. To start, we build a contact form, which prompts the user for information and then sends that information to us via email. We then build a view and URL pattern to interact with the form, saving the actual templates of the page for last.
The following process for building a data-processing webpage is reproduced for convenience from Chapter 9: Controlling Forms in Views, Section 9.5.
1. Create a form class that inherits ModelForm.
2. Implement any necessary clean functions for the fields of the form.
3. Create a CBV with get() and post() methods exactly as detailed in the chapter, making sure to specify any desirable attributes (form_class, model, and template_name, being the most ...
Read now
Unlock full access