Permalink
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/template/defaultfilters.py
View
3 django/template/defaultfilters.py
@@ -254,7 +254,7 @@ def truncatechars(value, arg):
length = int(arg)
except ValueError: # Invalid literal for int().
return value # Fail silently.
- return Truncator(value).chars(value, length)
+ return Truncator(value).chars(length)
truncatechars.is_safe = True
truncatechars = stringfilter(truncatechars)
@@ -922,6 +922,7 @@ def pprint(value):
register.filter(striptags)
register.filter(time)
register.filter(title)
+register.filter(truncatechars)
register.filter(truncatewords)
register.filter(truncatewords_html)
register.filter(unordered_list)

0 comments on commit afd8a47

Please sign in to comment.