Skip to content

Commit

Permalink
Fixed #8544 -- Some more documentation markup fixes from Thejawsi Put…
Browse files Browse the repository at this point in the history
…hraya.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Aug 27, 2008
1 parent 5577b96 commit 9de848c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion docs/ref/forms/fields.txt
Expand Up @@ -324,6 +324,7 @@ For each field, we describe the default widget used if you don't specify
instead of ``None`` in the development version. instead of ``None`` in the development version.


.. note:: .. note::

Since all ``Field`` subclasses have ``required=True`` by default, the Since all ``Field`` subclasses have ``required=True`` by default, the
validation condition here is important. If you want to include a checkbox validation condition here is important. If you want to include a checkbox
in your form that can be either checked or unchecked, you must remember to in your form that can be either checked or unchecked, you must remember to
Expand All @@ -345,6 +346,7 @@ Has two optional arguments for validation:


.. attribute:: CharField.max_length .. attribute:: CharField.max_length
.. attribute:: CharField.min_length .. attribute:: CharField.min_length

If provided, these arguments ensure that the string is at most or at least If provided, these arguments ensure that the string is at most or at least
the given length. the given length.


Expand All @@ -362,6 +364,7 @@ Has two optional arguments for validation:
Takes one extra required argument: Takes one extra required argument:


.. attribute:: ChoiceField.choices .. attribute:: ChoiceField.choices

An iterable (e.g., a list or tuple) of 2-tuples to use as choices for this An iterable (e.g., a list or tuple) of 2-tuples to use as choices for this
field. field.


Expand All @@ -380,6 +383,7 @@ Takes one extra required argument:
Takes one optional argument: Takes one optional argument:


.. attribute:: DateField.input_formats .. attribute:: DateField.input_formats

A list of formats used to attempt to convert a string to a valid A list of formats used to attempt to convert a string to a valid
``datetime.date`` object. ``datetime.date`` object.


Expand All @@ -406,6 +410,7 @@ If no ``input_formats`` argument is provided, the default input formats are::
Takes one optional argument: Takes one optional argument:


.. attribute:: DateTimeField.input_formats .. attribute:: DateTimeField.input_formats

A list of formats used to attempt to convert a string to a valid A list of formats used to attempt to convert a string to a valid
``datetime.datetime`` object. ``datetime.datetime`` object.


Expand Down Expand Up @@ -444,14 +449,17 @@ Takes four optional arguments:


.. attribute:: DecimalField.max_value .. attribute:: DecimalField.max_value
.. attribute:: DecimalField.min_value .. attribute:: DecimalField.min_value

These attributes define the limits for the fields value. These attributes define the limits for the fields value.


.. attribute:: DecimalField.max_digits .. attribute:: DecimalField.max_digits

The maximum number of digits (those before the decimal point plus those The maximum number of digits (those before the decimal point plus those
after the decimal point, with leading zeros stripped) permitted in the after the decimal point, with leading zeros stripped) permitted in the
value. value.


.. attribute:: DecimalField.decimal_places .. attribute:: DecimalField.decimal_places

The maximum number of decimal places permitted. The maximum number of decimal places permitted.


``EmailField`` ``EmailField``
Expand Down Expand Up @@ -507,15 +515,18 @@ The field allows choosing from files inside a certain directory. It takes three
extra arguments; only ``path`` is required: extra arguments; only ``path`` is required:


.. attribute:: FilePathField.path .. attribute:: FilePathField.path

The absolute path to the directory whose contents you want listed. This The absolute path to the directory whose contents you want listed. This
directory must exist. directory must exist.


.. attribute:: FilePathField.recursive .. attribute:: FilePathField.recursive

If ``False`` (the default) only the direct contents of ``path`` will be If ``False`` (the default) only the direct contents of ``path`` will be
offered as choices. If ``True``, the directory will be descended into offered as choices. If ``True``, the directory will be descended into
recursively and all descendants will be listed as choices. recursively and all descendants will be listed as choices.


.. attribute:: FilePathField.match .. attribute:: FilePathField.match

A regular expression pattern; only files with names matching this expression A regular expression pattern; only files with names matching this expression
will be allowed as choices. will be allowed as choices.


Expand Down Expand Up @@ -573,6 +584,7 @@ Takes two optional arguments for validation:


.. attribute:: IntegerField.max_value .. attribute:: IntegerField.max_value
.. attribute:: IntegerField.min_value .. attribute:: IntegerField.min_value

These control the range of values permitted in the field. These control the range of values permitted in the field.


``IPAddressField`` ``IPAddressField``
Expand Down Expand Up @@ -625,7 +637,8 @@ Takes one extra argument, ``choices``, as for ``ChoiceField``.


Takes one required argument: Takes one required argument:


.. attribute:: RegexField.regex`` .. attribute:: RegexField.regex

A regular expression specified either as a string or a compiled regular A regular expression specified either as a string or a compiled regular
expression object. expression object.


Expand All @@ -652,6 +665,7 @@ and the error message as the value.
Takes one optional argument: Takes one optional argument:


.. attribute:: TimeField.input_formats .. attribute:: TimeField.input_formats

A list of formats used to attempt to convert a string to a valid A list of formats used to attempt to convert a string to a valid
``datetime.time`` object. ``datetime.time`` object.


Expand All @@ -676,13 +690,16 @@ Takes the following optional arguments:


.. attribute:: URLField.max_length .. attribute:: URLField.max_length
.. attribute:: URLField.min_length .. attribute:: URLField.min_length

Same as ``CharField.max_length`` and ``CharField.min_length``. Same as ``CharField.max_length`` and ``CharField.min_length``.


.. attribute:: URLField.verify_exists .. attribute:: URLField.verify_exists

If ``True``, the validator will attempt to load the given URL, raising If ``True``, the validator will attempt to load the given URL, raising
``ValidationError`` if the page gives a 404. Defaults to ``False``. ``ValidationError`` if the page gives a 404. Defaults to ``False``.


.. attribute:: URLField.validator_user_agent .. attribute:: URLField.validator_user_agent

String used as the user-agent used when checking for a URL's existence. String used as the user-agent used when checking for a URL's existence.
Defaults to the value of the ``URL_VALIDATOR_USER_AGENT`` setting. Defaults to the value of the ``URL_VALIDATOR_USER_AGENT`` setting.


Expand Down Expand Up @@ -711,6 +728,7 @@ dictionary of forms in which they're used. Both of these fields have an
additional required argument: additional required argument:


.. attribute:: ModelChoiceField.queryset .. attribute:: ModelChoiceField.queryset

A ``QuerySet`` of model objects from which the choices for the A ``QuerySet`` of model objects from which the choices for the
field will be derived, and which will be used to validate the field will be derived, and which will be used to validate the
user's selection. user's selection.
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/settings.txt
Expand Up @@ -1001,7 +1001,7 @@ See :ref:`topics-templates`..
TEMPLATE_LOADERS TEMPLATE_LOADERS
---------------- ----------------


Default: Default::


('django.template.loaders.filesystem.load_template_source', ('django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source') 'django.template.loaders.app_directories.load_template_source')
Expand Down

0 comments on commit 9de848c

Please sign in to comment.