Add simple split filter, as the opposite of the built-in join filter
- Legacy-Id: 6710
This commit is contained in:
parent
e6b0ef4323
commit
3a483461a2
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue