Changes between Version 10 and Version 11 of NewForms


Ignore:
Timestamp:
07/27/2007 02:08:26 PM (8 years ago)
Author:
graham@…
Comment:

Updated links to unit tests with correct line numbers

Legend:

Unmodified
Added
Removed
Modified
  • NewForms

    v10 v11  
    22Since newforms is mostly undocumented at the moment this page summarizes some useful information. This documentation should be considered complementary to the documentation on [http://www.djangoproject.com/documentation/newforms/]. It's mostly information extracted from the [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py unit tests for newforms] at the moment.
    33
    4 == Widgets [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L8 Unit tests] ==
     4== Widgets [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L15 Unit tests] ==
    55Each `Widget` subclass corresponds to an HTML form widget. A `Widget` knows how to
    66render itself, given a field name and some data. Widgets don't perform
     
    1111
    1212
    13 ===== !TextInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L15 Unit test] =====
    14 ===== !PasswordInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L46 Unit test] =====
    15 ===== !HiddenInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L75 Unit test] =====
    16 ===== !FileInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L109 Unit test] =====
    17 ===== Textarea [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L133 Unit test] =====
    18 ===== !CheckboxInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L162 Unit test] =====
    19 ===== Select [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L215 Unit test] =====
    20 ===== !SelectMultiple [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L299 Unit test] =====
    21 ===== !RadioSelect [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L406 Unit test] =====
    22 ===== !CheckboxSelectMultiple [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L536 Unit test] =====
     13===== !TextInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L23 Unit test] =====
     14===== !PasswordInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L54 Unit test] =====
     15===== !HiddenInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L99 Unit test] =====
     16===== !MultipleHiddenInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L132 Unit test] =====
     17===== !FileInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L173 Unit test] =====
     18===== Textarea [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L197 Unit test] =====
     19===== !CheckboxInput [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L226 Unit test] =====
     20===== Select [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L279 Unit test] =====
     21===== !NullBooleanSelect [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L395 Unit test] =====
     22===== !SelectMultiple [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L429 Unit test] =====
     23===== !RadioSelect [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L536 Unit test] =====
     24===== !CheckboxSelectMultiple [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L691 Unit test] =====
     25===== Multi [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L798 Unit test] =====
     26===== !SplitDateTime [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L818 Unit test] =====
    2327
    2428
     
    3539Other than that, the Field subclasses have class-specific options for `__init__()`. For example, !CharField has a `max_length` option.
    3640
    37 === Field types [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L644 Unit tests] ===
     41=== Field types [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L836 Unit tests] ===
    3842List of field types with their associated unit test for easy lookup.
    3943
    40 ===== !CharField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L669 Unit test] =====
     44===== !CharField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L860 Unit test] =====
    4145Arguments:
    4246 * ''max_length'' -- (optional) Maximum number of characters
    4347 * ''min_length'' -- (optional) Minimum number of characters
    4448
    45 ===== !IntegerField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L735 Unit test] =====
     49===== !IntegerField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L928 Unit test] =====
    4650Arguments:
    4751 * ''max_value'' -- (optional) Maximum value
    4852 * ''min_value'' -- (optional) Minimum value
    4953
    50 ===== !DateField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L858 Unit test] =====
     54===== !FloatField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1053 Unit test] =====
     55
     56===== !DecimalField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1111 Unit test] =====
     57
     58===== !DateField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1184 Unit test] =====
    5159Arguments:
    5260 * ''input_formats'' -- (optional) A list of `strftime()` input formats. These will override all other input formats
    5361
    54 ===== !TimeField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L935 Unit test] =====
     62===== !TimeField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1261 Unit test] =====
    5563
    56 ===== !DateTimeField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L974 Unit test] =====
     64===== !DateTimeField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1300 Unit test] =====
    5765
    58 ===== !RegexField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1047 Unit test] =====
     66===== !RegexField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1373 Unit test] =====
    5967Arguments:
    6068 * ''regex'' -- The regular expression in compiled or string form that the input should match
    6169
    62 ===== !EmailField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1138 Unit test] =====
     70===== !EmailField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1464 Unit test] =====
    6371Arguments:
    6472 * ''min_length'' -- Minimum length
    6573 * ''max_length'' -- Maximum length
    6674
    67 ===== URLField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1243 Unit test] =====
     75===== URLField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1523 Unit test] =====
    6876Arguments:
    6977 * ''min_length'' -- Minimum length
     
    7179 * ''verify_exists'' -- Defaults to ''False''. If ''True'', verifies that the URL is live on the Internet and doesn't return a 404 or 500
    7280
    73 ===== !BooleanField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1302 Unit test] =====
     81===== !BooleanField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1633 Unit test] =====
    7482Since HTML forms either return something like '`fieldname=on`' in `request.POST` or `request.GET`, this value may not be set in `form.clean_data()`.
    7583
     
    7785 * ''None''
    7886
    79 ===== !ChoiceField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1340 Unit test] =====
     87===== !ChoiceField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1671 Unit test] =====
    8088Arguments:
    8189 * ''choices'' -- A list of (key, value) pairs
    8290
    83 ===== !MultipleChoiceField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1382 Unit test] =====
     91===== !MultipleChoiceField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1727 Unit test] =====
    8492Arguments:
    8593 * ''choices'' -- A list of (key, value) pairs
    8694
    87 ===== !ComboField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1448 Unit test] =====
     95===== !ComboField [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1793 Unit test] =====
    8896!ComboField takes a list of fields that should be used to validate a value, in that order.
    8997
     
    9199 * ''choices'' -- A list of fields used to validate the input value
    92100
    93 == Forms [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1489 Unit test] ==
     101===== !SplitDateTimeField  [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1833 Unit test] =====
     102
     103== Forms [http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L1901 Unit test] ==
    94104A 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).
    95105
Back to Top