1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #19496 -- Added truncatechars_html filter.

Thanks esevece for the suggestion and  Nick Sandford and Martin Warne
for the inital work on the patch.
This commit is contained in:
Jeremy
2013-01-10 17:27:20 +08:00
committed by Tim Graham
parent 390001ce52
commit f94f466cd3
5 changed files with 93 additions and 23 deletions

View File

@@ -657,7 +657,7 @@ Templates
* :func:`django.shortcuts.render()`
* :func:`django.shortcuts.render_to_response()`
* The :tfilter:`time` filter now accepts timzone-related :ref:`format
* The :tfilter:`time` filter now accepts timezone-related :ref:`format
specifiers <date-and-time-formatting-specifiers>` ``'e'``, ``'O'`` , ``'T'``
and ``'Z'`` and is able to digest :ref:`time-zone-aware
<naive_vs_aware_datetimes>` ``datetime`` instances performing the expected
@@ -668,6 +668,9 @@ Templates
otherwise. It also now accepts an optional ``using`` keyword argument to
control which cache it uses.
* The new :tfilter:`truncatechars_html` filter truncates a string to be no
longer than the specified number of characters, taking HTML into account.
Requests
^^^^^^^^