From e4dd8b5dde922d967697b2bdd573aa2364da4f1b Mon Sep 17 00:00:00 2001 From: areski Date: Mon, 4 Aug 2014 13:29:59 +0200 Subject: [PATCH] Fixed #23169 - Misc docs fixes. --- docs/ref/forms/fields.txt | 10 +++++----- docs/ref/forms/widgets.txt | 2 +- docs/topics/http/file-uploads.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 7dd0510237..3fbbac9624 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -299,7 +299,7 @@ as the rendered output. See the :ref:`format localization ` documentation for more information. -.. _built-in fields: +.. _built-in-fields: Built-in ``Field`` classes -------------------------- @@ -427,7 +427,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' @@ -957,12 +957,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'^[0-9]+$', 'Enter a valid country code.')]), + CharField(error_messages={'incomplete': 'Enter a country calling code.'}, + validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid country calling code.')]), CharField(error_messages={'incomplete': 'Enter a phone number.'}, validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid phone number.')]), CharField(validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid extension.')], diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 7ed235b9e3..541f43dcb3 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 diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt index 81d7ba043d..ec45665bea 100644 --- a/docs/topics/http/file-uploads.txt +++ b/docs/topics/http/file-uploads.txt @@ -26,7 +26,7 @@ Consider a simple form containing a :class:`~django.forms.FileField`:: class UploadFileForm(forms.Form): title = forms.CharField(max_length=50) - file = forms.FileField() + file = forms.FileField() A view handling this form will receive the file data in :attr:`request.FILES `, which is a dictionary