Django Model Forms

Опубликовано: 28 Август 2019
на канале: Technology Hub
84
4

Django provides a Form class which is used to create HTML forms. It describes a form and how it works and appears.

It is similar to the ModelForm class that creates a form by using the Model, but it does not require the Model.

Each field of the form class map to the HTML form input element and each one is a class itself, it manages form data and performs validation while submitting the form.

Lets see an example, in which I am creating a model and using it on HTML form