mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
[1.9.x] Fixed #25812 -- Restored the ability to use custom formats with the date template filter.
Backport of 34d88944f4 from master
This commit is contained in:
@@ -14,3 +14,7 @@ Bugfixes
|
||||
|
||||
* Corrected ``__len`` query lookup on ``ArrayField`` for empty arrays
|
||||
(:ticket:`25772`).
|
||||
|
||||
* Restored the ability to use custom formats from ``formats.py`` with
|
||||
``django.utils.formats.get_format()`` and the ``date`` template filter
|
||||
(:ticket:`25812`).
|
||||
|
||||
@@ -170,7 +170,10 @@ the package where format files will exist, for instance::
|
||||
]
|
||||
|
||||
Files are not placed directly in this directory, but in a directory named as
|
||||
the locale, and must be named ``formats.py``.
|
||||
the locale, and must be named ``formats.py``. Be careful not to put sensitive
|
||||
information in these files as values inside can be exposed if you pass the
|
||||
string to ``django.utils.formats.get_format()`` (used by the :tfilter:`date`
|
||||
template filter).
|
||||
|
||||
To customize the English formats, a structure like this would be needed::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user