Changes between Version 2 and Version 3 of NewForms
- Timestamp:
- Jan 3, 2007, 3:19:10 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewForms
v2 v3 89 89 90 90 == Forms [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1489 Unit test] == 91 A Form is a collection of Fields. It knows how to validate a set of data and it knows how to render itself in a couple of default ways (e.g., an HTML table). You can pass it data in __init__(), as a dictionary.91 A Form is a collection of Fields. It knows how to validate a set of data and it knows how to render itself in a couple of default ways (e.g., an HTML table). 92 92 93 You can pass it data in __init__(), as a dictionary, this data will usually come from request.POST or request.GET. The dictionaries passed to form need not be complete, a partial or empty dictionary is valid too. If you don't pass any values to the Form's __init__(), or if you pass None, the Form won't do any validation. Form.errors will be an empty dictionary *but* Form.is_valid() will return False. 93 94