Added a note to the release notes about the new format strings added in r17473.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4f1ac8f5f1
commit
bd13cfa917
|
@ -1361,6 +1361,10 @@ Z Time zone offset in seconds. The ``-43200`` to ``4320
|
||||||
|
|
||||||
The ``c`` and ``u`` format specification characters were added in Django 1.2.
|
The ``c`` and ``u`` format specification characters were added in Django 1.2.
|
||||||
|
|
||||||
|
.. versionadded:: 1.4
|
||||||
|
|
||||||
|
The ``e`` and ``o`` format specification characters were added in Django 1.4.
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
{{ value|date:"D d M Y" }}
|
{{ value|date:"D d M Y" }}
|
||||||
|
|
|
@ -502,6 +502,28 @@ Time zone support is enabled by default in new projects created with
|
||||||
:djadmin:`startproject`. If you want to use this feature in an existing
|
:djadmin:`startproject`. If you want to use this feature in an existing
|
||||||
project, there is a :ref:`migration guide <time-zones-migration-guide>`.
|
project, there is a :ref:`migration guide <time-zones-migration-guide>`.
|
||||||
|
|
||||||
|
Two new date format strings
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Two new :tfilter:`date` formats for use in template filters, template tags
|
||||||
|
and :ref:`format-localization`:
|
||||||
|
|
||||||
|
- ``e`` -- the name of the timezone of the given datetime object
|
||||||
|
- ``o`` -- the ISO 8601 year number
|
||||||
|
|
||||||
|
Please make sure to update your :ref:`custom format files
|
||||||
|
<custom-format-files>` if they contain either ``e`` or ``o`` in a format
|
||||||
|
string. For example a Spanish localization format previously only escaped the
|
||||||
|
``d`` format character::
|
||||||
|
|
||||||
|
DATE_FORMAT = r'j \de F \de Y'
|
||||||
|
|
||||||
|
But now it needs to also escape ``e`` and ``o``::
|
||||||
|
|
||||||
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
|
|
||||||
|
For more information, see the :tfilter:`date` documentation.
|
||||||
|
|
||||||
Minor features
|
Minor features
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -490,6 +490,28 @@ the ``html=True`` flag with
|
||||||
client's response contains a given HTML fragment. See the :ref:`assertion
|
client's response contains a given HTML fragment. See the :ref:`assertion
|
||||||
documentation<assertions>` for more.
|
documentation<assertions>` for more.
|
||||||
|
|
||||||
|
Two new date format strings
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Two new :tfilter:`date` formats for use in template filters, template tags
|
||||||
|
and :ref:`format-localization`:
|
||||||
|
|
||||||
|
- ``e`` -- the name of the timezone of the given datetime object
|
||||||
|
- ``o`` -- the ISO 8601 year number
|
||||||
|
|
||||||
|
Please make sure to update your :ref:`custom format files
|
||||||
|
<custom-format-files>` if they contain either ``e`` or ``o`` in a format
|
||||||
|
string. For example a Spanish localization format previously only escaped the
|
||||||
|
``d`` format character::
|
||||||
|
|
||||||
|
DATE_FORMAT = r'j \de F \de Y'
|
||||||
|
|
||||||
|
But now it needs to also escape ``e`` and ``o``::
|
||||||
|
|
||||||
|
DATE_FORMAT = r'j \d\e F \d\e Y'
|
||||||
|
|
||||||
|
For more information, see the :tfilter:`date` documentation.
|
||||||
|
|
||||||
Minor features
|
Minor features
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,8 @@ To force localization of a single value, use :tfilter:`localize`. To
|
||||||
control localization over a large section of a template, use the
|
control localization over a large section of a template, use the
|
||||||
:ttag:`localize` template tag.
|
:ttag:`localize` template tag.
|
||||||
|
|
||||||
|
.. _custom-format-files:
|
||||||
|
|
||||||
Creating custom format files
|
Creating custom format files
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue