Add simple split filter, as the opposite of the built-in join filter

- Legacy-Id: 6710
This commit is contained in:
Ole Laursen 2013-11-15 12:49:37 +00:00
parent e6b0ef4323
commit 3a483461a2

View file

@ -277,6 +277,10 @@ def truncate_ellipsis(text, arg):
else:
return escape(text)
@register.filter
def split(text, splitter=None):
return text.split(splitter)
@register.filter(name="wrap_long_lines")
def wrap_long_lines(text):
"""Wraps long lines without loosing the formatting and indentation