python3: add list filter tag, useful to convert dictionary views
This commit is contained in:
parent
e81294ed17
commit
1bd5333cb5
|
@ -220,3 +220,7 @@ def get_group(group_list, group_name):
|
|||
@register.filter(name='is_empty_placeholder')
|
||||
def is_empty_placeholder(page, placeholder_name):
|
||||
return len([x for x in page.get_cells() if x.placeholder == placeholder_name]) == 0
|
||||
|
||||
@register.filter(name='list')
|
||||
def as_list(obj):
|
||||
return list(obj)
|
||||
|
|
Loading…
Reference in New Issue