Fixed #5025 -- Add a "truncatechars" template filter. Many thanks to Chris Beaven.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-07-14 13:47:10 +00:00
parent 12b7c2a702
commit 3b77458371
7 changed files with 281 additions and 86 deletions

View file

@ -145,6 +145,14 @@ A new helper function,
``template.Library`` to ease the creation of template tags that store some
data in a specified context variable.
``truncatechars`` template filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added a filter which truncates a string to be no longer than the specified
number of characters. Truncated strings end with a translatable ellipsis
sequence ("..."). See the :tfilter:`truncatechars docs <truncatechars>` for
more details.
CSRF improvements
~~~~~~~~~~~~~~~~~