django
Introduction
I started this halfway, so restart when done to finish the start !!
Source : visit
working with forms
Source : visit
GET and POST are the only HTTP methods to use when dealing with forms.
The Form class maps fields to form elements, like Model maps fields to database entries/columns. And a ModelForm can be used to map an existing Model int a Form.
A Form's Fields are also themselves classes, like FileField or DateField. They are represented in html as Widget classes, who can be overridden if needed.
You generally instantiate a model class, and create a view using a template:
form class
instantiate a subclass of forms.Form, and add field to it or let django do that (ModelForm)
| forms | |
|---|---|
view
template
The rendered form does not contain