summaryrefslogtreecommitdiff
path: root/docs/ref/forms
diff options
context:
space:
mode:
authorareski <areski@gmail.com>2014-08-04 13:29:59 +0200
committerTim Graham <timograham@gmail.com>2014-08-04 08:31:18 -0400
commita582431b414295ad4cabf0dc8d76229512a459df (patch)
tree5be74175ee4c28f159b4f8e18164919799f5d1f2 /docs/ref/forms
parentd723da383da81de6d2b3b149eb8ced80d9d2c29c (diff)
[1.7.x] Fixed #23169 - Misc docs fixes.
Backport of e4dd8b5dde from master
Diffstat (limited to 'docs/ref/forms')
-rw-r--r--docs/ref/forms/fields.txt10
-rw-r--r--docs/ref/forms/widgets.txt2
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index cac1d752b0..b58475013e 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -279,7 +279,7 @@ as the rendered output.
See the :ref:`format localization <format-localization>` documentation for
more information.
-.. _built-in fields:
+.. _built-in-fields:
Built-in ``Field`` classes
--------------------------
@@ -407,7 +407,7 @@ For each field, we describe the default widget used if you don't specify
If no ``input_formats`` argument is provided, the default input formats are::
- ['%Y-%m-%d', # '2006-10-25'
+ ['%Y-%m-%d', # '2006-10-25'
'%m/%d/%Y', # '10/25/2006'
'%m/%d/%y'] # '10/25/06'
@@ -930,12 +930,12 @@ Slightly complex built-in ``Field`` classes
def __init__(self, *args, **kwargs):
# Define one message for all fields.
error_messages = {
- 'incomplete': 'Enter a country code and phone number.',
+ 'incomplete': 'Enter a country calling code and a phone number.',
}
# Or define a different message for each field.
fields = (
- CharField(error_messages={'incomplete': 'Enter a country code.'},
- validators=[RegexValidator(r'^\d+$', 'Enter a valid country code.')]),
+ CharField(error_messages={'incomplete': 'Enter a country calling code.'},
+ validators=[RegexValidator(r'^\d+$', 'Enter a valid country calling code.')]),
CharField(error_messages={'incomplete': 'Enter a phone number.'},
validators=[RegexValidator(r'^\d+$', 'Enter a valid phone number.')]),
CharField(validators=[RegexValidator(r'^\d+$', 'Enter a valid extension.')],
diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
index d0dc17a2bc..293c69df1f 100644
--- a/docs/ref/forms/widgets.txt
+++ b/docs/ref/forms/widgets.txt
@@ -27,7 +27,7 @@ Specifying widgets
Whenever you specify a field on a form, Django will use a default widget
that is appropriate to the type of data that is to be displayed. To find
which widget is used on which field, see the documentation about
-:ref:`built-in fields`.
+:ref:`built-in-fields`.
However, if you want to use a different widget for a field, you can
just use the :attr:`~Field.widget` argument on the field definition. For