Chapter 7. Working with Django Forms
We all know about HTML forms. This is a
<form> tag that contains the
<select> tags. The user can fill in or edit these items and return them to the server. This is the preferred way to store data provided by the client. Frameworks such as Django seized the HTML form to make it better.
A Django form is inherited from the
Form class object. It is an object in which we will set properties. These properties will be the fields in the form, and we will define their type.
In this chapter, we will learn how to do the following:
- Create an HTML form
- Handle the data sent by a form
- Create a Django form
- Validate and manipulate data sent from a Django form
- Create forms based on models
- Customize error messages and use ...