mirror of https://github.com/django/django.git
Fixed #12967 - Added missing versionadded/-changed doc markers for r11964. Thanks, Karen and Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5670331343
commit
5787925cdb
|
@ -203,7 +203,7 @@ end users) indicating the reason the request was rejected. See
|
|||
DATABASES
|
||||
---------
|
||||
|
||||
.. versionadded: 1.2
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``{}`` (Empty dictionary)
|
||||
|
||||
|
@ -393,7 +393,7 @@ See :ref:`topics-testing`.
|
|||
DATABASE_ROUTERS
|
||||
----------------
|
||||
|
||||
.. versionadded: 1.2
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``[]`` (Empty list)
|
||||
|
||||
|
@ -410,9 +410,13 @@ DATE_FORMAT
|
|||
|
||||
Default: ``'N j, Y'`` (e.g. ``Feb. 4, 2003``)
|
||||
|
||||
The default formatting to use for date fields in any part of the system.
|
||||
Note that if ``USE_L10N`` is set to ``True``, then locale format will
|
||||
be applied. See :ttag:`allowed date format strings <now>`.
|
||||
The default formatting to use for displaying date fields in any part of the
|
||||
system. Note that if setting:`USE_L10N` is set to ``True``, then the
|
||||
locale-dictated format has higher precedence and will be applied instead. See
|
||||
:ttag:`allowed date format strings <now>`.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
This setting can now be overriden by setting ``USE_L10N`` to ``True``.
|
||||
|
||||
See also ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATE_FORMAT``.
|
||||
|
||||
|
@ -421,6 +425,8 @@ See also ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATE_FORMAT``.
|
|||
DATE_INPUT_FORMATS
|
||||
------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default::
|
||||
|
||||
('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y',
|
||||
|
@ -444,9 +450,13 @@ DATETIME_FORMAT
|
|||
|
||||
Default: ``'N j, Y, P'`` (e.g. ``Feb. 4, 2003, 4 p.m.``)
|
||||
|
||||
The default formatting to use for datetime fields in any part of the system.
|
||||
Note that if ``USE_L10N`` is set to ``True``, then locale format will
|
||||
be applied. See :ttag:`allowed date format strings <now>`.
|
||||
The default formatting to use for displaying datetime fields in any part of the
|
||||
system. Note that if setting:`USE_L10N` is set to ``True``, then the
|
||||
locale-dictated format has higher precedence and will be applied instead. See
|
||||
:ttag:`allowed date format strings <now>`.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
This setting can now be overriden by setting ``USE_L10N`` to ``True``.
|
||||
|
||||
See also ``DATE_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
|
||||
|
||||
|
@ -455,6 +465,8 @@ See also ``DATE_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
|
|||
DATETIME_INPUT_FORMATS
|
||||
----------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default::
|
||||
|
||||
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d',
|
||||
|
@ -514,6 +526,8 @@ site.
|
|||
DECIMAL_SEPARATOR
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``'.'`` (Dot)
|
||||
|
||||
Default decimal separator used when formatting decimal numbers.
|
||||
|
@ -771,6 +785,8 @@ system's standard umask.
|
|||
FIRST_DAY_OF_WEEK
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``0`` (Sunday)
|
||||
|
||||
Number representing the first day of the week. This is especially useful
|
||||
|
@ -807,6 +823,8 @@ of the preferred value or not supplied at all.
|
|||
FORMAT_MODULE_PATH
|
||||
------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``None``
|
||||
|
||||
A full Python path to a Python package that contains format definitions for
|
||||
|
@ -1106,6 +1124,8 @@ See :ttag:`allowed date format strings <now>`. See also ``DATE_FORMAT``,
|
|||
NUMBER_GROUPING
|
||||
----------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``0``
|
||||
|
||||
Number of digits grouped together on the integer part of a number. Common use
|
||||
|
@ -1328,11 +1348,14 @@ Whether to save the session data on every request. See
|
|||
SHORT_DATE_FORMAT
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``m/d/Y`` (e.g. ``12/31/2003``)
|
||||
|
||||
An available formatting that can be used for date fields on templates.
|
||||
Note that if ``USE_L10N`` is set to ``True``, then locale format will
|
||||
be applied. See :ttag:`allowed date format strings <now>`.
|
||||
An available formatting that can be used for displaying date fields on
|
||||
templates. Note that if ``USE_L10N`` is set to ``True``, then the corresponding
|
||||
locale-dictated format has higher precedence and will be applied. See
|
||||
:ttag:`allowed date format strings <now>`.
|
||||
|
||||
See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
|
||||
|
||||
|
@ -1341,11 +1364,14 @@ See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
|
|||
SHORT_DATETIME_FORMAT
|
||||
---------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``m/d/Y P`` (e.g. ``12/31/2003 4 p.m.``)
|
||||
|
||||
An available formatting that can be used for datetime fields on templates.
|
||||
Note that if ``USE_L10N`` is set to ``True``, then locale format will
|
||||
be applied. See :ttag:`allowed date format strings <now>`.
|
||||
An available formatting that can be used for displaying datetime fields on
|
||||
templates. Note that if ``USE_L10N`` is set to ``True``, then the corresponding
|
||||
locale-dictated format has higher precedence and will be applied. See
|
||||
:ttag:`allowed date format strings <now>`.
|
||||
|
||||
See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
|
||||
|
||||
|
@ -1461,6 +1487,8 @@ The name of the class to use for starting the test suite. See
|
|||
THOUSAND_SEPARATOR
|
||||
------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default ``,`` (Comma)
|
||||
|
||||
Default thousand separator used when formatting numbers. This setting is
|
||||
|
@ -1475,9 +1503,13 @@ TIME_FORMAT
|
|||
|
||||
Default: ``'P'`` (e.g. ``4 p.m.``)
|
||||
|
||||
The default formatting to use for time fields in any part of the system.
|
||||
Note that if ``USE_L10N`` is set to ``True``, then locale format will
|
||||
be applied. See :ttag:`allowed date format strings <now>`.
|
||||
The default formatting to use for displaying time fields in any part of the
|
||||
system. Note that if setting:`USE_L10N` is set to ``True``, then the
|
||||
locale-dictated format has higher precedence and will be applied instead. See
|
||||
:ttag:`allowed date format strings <now>`.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
This setting can now be overriden by setting ``USE_L10N`` to ``True``.
|
||||
|
||||
See also ``DATE_FORMAT`` and ``DATETIME_FORMAT``.
|
||||
|
||||
|
@ -1486,6 +1518,8 @@ See also ``DATE_FORMAT`` and ``DATETIME_FORMAT``.
|
|||
TIME_INPUT_FORMATS
|
||||
------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default: ``('%H:%M:%S', '%H:%M')``
|
||||
|
||||
A tuple of formats that will be accepted when inputting data on a time
|
||||
|
@ -1570,6 +1604,8 @@ is installed (see :ref:`topics-http-middleware`).
|
|||
USE_L10N
|
||||
--------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default ``False``
|
||||
|
||||
A boolean that specifies if data will be localized by default or not. If this
|
||||
|
@ -1597,6 +1633,8 @@ See also ``USE_L10N``
|
|||
USE_THOUSAND_SEPARATOR
|
||||
----------------------
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Default ``False``
|
||||
|
||||
A boolean that specifies wheter to display numbers using a thousand separator.
|
||||
|
|
|
@ -1103,6 +1103,16 @@ If ``value`` is a ``datetime`` object (e.g., the result of
|
|||
``datetime.datetime.now()``), the output will be the string
|
||||
``'Wed 09 Jan 2008'``.
|
||||
|
||||
Another example:
|
||||
|
||||
Assuming that :setting:`USE_L10N` is ``True`` and :setting:`LANGUAGE_CODE` is,
|
||||
for example, ``"es"``, then for::
|
||||
|
||||
{{ value|date:"SHORT_DATE_FORMAT" }}
|
||||
|
||||
the output will be the string ``"09/01/2008"`` (The ``"SHORT_DATE_FORMAT"``
|
||||
format specifier for the ``es`` locale as shipped with Django is ``"d/m/Y"``).
|
||||
|
||||
When used without a format string::
|
||||
|
||||
{{ value|date }}
|
||||
|
@ -1110,6 +1120,9 @@ When used without a format string::
|
|||
...the formatting string defined in the :setting:`DATE_FORMAT` setting will be
|
||||
used, without applying any localization.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
Predefined formats can now be influenced by the current locale.
|
||||
|
||||
.. templatefilter:: default
|
||||
|
||||
default
|
||||
|
@ -1730,12 +1743,25 @@ For example::
|
|||
If ``value`` is equivalent to ``datetime.datetime.now()``, the output will be
|
||||
the string ``"01:23"``.
|
||||
|
||||
Another example:
|
||||
|
||||
Assuming that :setting:`USE_L10N` is ``True`` and :setting:`LANGUAGE_CODE` is,
|
||||
for example, ``"de"``, then for::
|
||||
|
||||
{{ value|time:"TIME_FORMAT" }}
|
||||
|
||||
the output will be the string ``"01:23:00"`` (The ``"TIME_FORMAT"`` format
|
||||
specifier for the ``de`` locale as shipped with Django is ``"H:i:s"``).
|
||||
|
||||
When used without a format string::
|
||||
|
||||
{{ value|time }}
|
||||
|
||||
...the formatting string defined in the :setting:`TIME_FORMAT` setting will be
|
||||
used, without aplying any localization.
|
||||
used, without applying any localization.
|
||||
|
||||
.. versionchanged:: 1.2
|
||||
Predefined formats can now be influenced by the current locale.
|
||||
|
||||
.. templatefilter:: timesince
|
||||
|
||||
|
|
|
@ -247,6 +247,8 @@ translation utilities with a ``gettext`` package if the command ``xgettext
|
|||
Format localization
|
||||
===================
|
||||
|
||||
.. versionadded:: 1.2
|
||||
|
||||
Django's formatting system is disabled by default. To enable it, it's necessary
|
||||
to set :setting:`USE_L10N = True <USE_L10N>` in your settings file.
|
||||
|
||||
|
|
Loading…
Reference in New Issue