mirror of https://github.com/django/django.git
Added 'Notes on field ordering' to docs/newforms.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d8a21981b7
commit
472a0d379e
|
@ -268,6 +268,15 @@ include ``%s`` -- then the library will act as if ``auto_id`` is ``True``.
|
||||||
|
|
||||||
By default, ``auto_id`` is set to the string ``'id_%s'``.
|
By default, ``auto_id`` is set to the string ``'id_%s'``.
|
||||||
|
|
||||||
|
Notes on field ordering
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
In the ``as_p()``, ``as_ul()`` and ``as_table()`` shortcuts, the fields are
|
||||||
|
displayed in the order in which you define them in your form class. For
|
||||||
|
example, in the ``ContactForm`` example, the fields are defined in the order
|
||||||
|
``subject``, ``message``, ``sender``, ``cc_myself``. To reorder the HTML
|
||||||
|
output, just change the order in which those fields are listed in the class.
|
||||||
|
|
||||||
More coming soon
|
More coming soon
|
||||||
================
|
================
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue