O'Reilly logo

Django Essentials by Samuel Dauzon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Working with Django Forms

We all know about HTML forms. This is a <form> tag that contains the <input> and <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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required