summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/api.txt6
-rw-r--r--docs/ref/forms/fields.txt10
-rw-r--r--docs/ref/forms/index.txt4
-rw-r--r--docs/ref/forms/validation.txt4
-rw-r--r--docs/ref/forms/widgets.txt45
5 files changed, 32 insertions, 37 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index 0d174ea4af..613d7544a9 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -1,5 +1,3 @@
-.. _ref-forms-api:
-
=============
The Forms API
=============
@@ -11,7 +9,7 @@ The Forms API
.. admonition:: About this document
This document covers the gritty details of Django's forms API. You should
- read the :ref:`introduction to working with forms <topics-forms-index>`
+ read the :doc:`introduction to working with forms </topics/forms/index>`
first.
.. _ref-forms-api-bound-unbound:
@@ -262,7 +260,7 @@ for each field in the "Built-in ``Field`` classes" section below.
You can write code to perform validation for particular form fields (based on
their name) or for the form as a whole (considering combinations of various
-fields). More information about this is in :ref:`ref-forms-validation`.
+fields). More information about this is in :doc:`/ref/forms/validation`.
Outputting forms as HTML
------------------------
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 396e51046e..0dd9095a77 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -1,5 +1,3 @@
-.. _ref-forms-fields:
-
===========
Form fields
===========
@@ -192,7 +190,7 @@ The callable will be evaluated only when the unbound form is displayed, not when
.. attribute:: Field.widget
The ``widget`` argument lets you specify a ``Widget`` class to use when
-rendering this ``Field``. See :ref:`ref-forms-widgets` for more information.
+rendering this ``Field``. See :doc:`/ref/forms/widgets` for more information.
``help_text``
~~~~~~~~~~~~~
@@ -267,7 +265,7 @@ error message keys it uses.
The ``validators`` argument lets you provide a list of validation functions
for this field.
-See the :ref:`validators documentation <ref-validators>` for more information.
+See the :doc:`validators documentation </ref/validators>` for more information.
``localize``
~~~~~~~~~~~~
@@ -516,8 +514,8 @@ given length.
* Validates that non-empty file data has been bound to the form.
* Error message keys: ``required``, ``invalid``, ``missing``, ``empty``
-To learn more about the ``UploadedFile`` object, see the :ref:`file uploads
-documentation <topics-http-file-uploads>`.
+To learn more about the ``UploadedFile`` object, see the :doc:`file uploads
+documentation </topics/http/file-uploads>`.
When you use a ``FileField`` in a form, you must also remember to
:ref:`bind the file data to the form <binding-uploaded-files>`.
diff --git a/docs/ref/forms/index.txt b/docs/ref/forms/index.txt
index e310863c7a..610416a363 100644
--- a/docs/ref/forms/index.txt
+++ b/docs/ref/forms/index.txt
@@ -1,10 +1,8 @@
-.. _ref-forms-index:
-
=====
Forms
=====
-Detailed form API reference. For introductory material, see :ref:`topics-forms-index`.
+Detailed form API reference. For introductory material, see :doc:`/topics/forms/index`.
.. toctree::
:maxdepth: 1
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt
index 911496c9ae..1c047f246f 100644
--- a/docs/ref/forms/validation.txt
+++ b/docs/ref/forms/validation.txt
@@ -1,5 +1,3 @@
-.. _ref-forms-validation:
-
Form and field validation
=========================
@@ -180,7 +178,7 @@ Using validators
.. versionadded:: 1.2
Django's form (and model) fields support use of simple utility functions and
-classes known as validators. These can passed to a field's constructor, via
+classes known as validators. These can be passed to a field's constructor, via
the field's ``validators`` argument, or defined on the Field class itself with
the ``default_validators`` attribute.
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index 1fc2bfa85d..05215d4d8e 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -1,12 +1,10 @@
-.. _ref-forms-widgets:
-
=======
Widgets
=======
.. module:: django.forms.widgets
:synopsis: Django's built-in form widgets.
-
+
.. currentmodule:: django.forms
A widget is Django's representation of a HTML input element. The widget
@@ -29,7 +27,12 @@ commonly used groups of widgets:
.. attribute:: PasswordInput.render_value
Determines whether the widget will have a value filled in when the
- form is re-displayed after a validation error (default is ``True``).
+ form is re-displayed after a validation error (default is ``False``).
+
+.. versionchanged:: 1.3
+ The default value for
+ :attr:`~PasswordInput.render_value` was
+ changed from ``True`` to ``False``
.. class:: HiddenInput
@@ -50,7 +53,7 @@ commonly used groups of widgets:
Date input as a simple text box: ``<input type='text' ...>``
Takes one optional argument:
-
+
.. attribute:: DateInput.format
The format in which this field's initial value will be displayed.
@@ -64,11 +67,11 @@ commonly used groups of widgets:
Date/time input as a simple text box: ``<input type='text' ...>``
Takes one optional argument:
-
+
.. attribute:: DateTimeInput.format
-
+
The format in which this field's initial value will be displayed.
-
+
If no ``format`` argument is provided, the default format is ``'%Y-%m-%d
%H:%M:%S'``.
@@ -77,11 +80,11 @@ commonly used groups of widgets:
Time input as a simple text box: ``<input type='text' ...>``
Takes one optional argument:
-
+
.. attribute:: TimeInput.format
-
+
The format in which this field's initial value will be displayed.
-
+
If no ``format`` argument is provided, the default format is ``'%H:%M:%S'``.
.. versionchanged:: 1.1
@@ -98,15 +101,15 @@ commonly used groups of widgets:
Takes one optional argument:
.. attribute:: CheckboxInput.check_test
-
- A callable that takes the value of the CheckBoxInput
+
+ A callable that takes the value of the CheckBoxInput
and returns ``True`` if the checkbox should be checked for
- that value.
+ that value.
.. class:: Select
Select widget: ``<select><option ...>...</select>``
-
+
Requires that your field provides :attr:`~Field.choices`.
.. class:: NullBooleanSelect
@@ -123,22 +126,22 @@ commonly used groups of widgets:
.. class:: RadioSelect
A list of radio buttons:
-
+
.. code-block:: html
-
+
<ul>
<li><input type='radio' ...></li>
...
</ul>
-
+
Requires that your field provides :attr:`~Field.choices`.
.. class:: CheckboxSelectMultiple
A list of checkboxes:
-
+
.. code-block:: html
-
+
<ul>
<li><input type='checkbox' ...></li>
...
@@ -155,7 +158,7 @@ commonly used groups of widgets:
Takes two optional arguments, ``date_format`` and ``time_format``, which
work just like the ``format`` argument for ``DateInput`` and ``TimeInput``.
-
+
.. versionchanged:: 1.1
The ``date_format`` and ``time_format`` arguments were not supported in Django 1.0.