Skip to content
Snippets Groups Projects
Commit 0dc0dd3e authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Changed 'split' filter to allow setting the maximum number of splits

parent e80e4531
No related branches found
No related tags found
No related merge requests found
......@@ -302,7 +302,7 @@ template_env.globals['context'] = get_context
# Additional filters
# - There's a join but no split operation...
template_env.filters['split'] = lambda x, s: x.split(s)
template_env.filters['split'] = lambda x, s, m=-1: x.split(s, m)
# - Add list operations filter and map
template_env.filters['filter'] = lambda x, f=None: filter(f, x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment