Code

Changes between Version 2 and Version 3 of NewForms


Ignore:
Timestamp:
01/03/07 13:19:10 (7 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewForms

    v2 v3  
    8989 
    9090== 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. 
     91A 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).  
    9292 
     93You 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. 
    9394