forked from DGNum/gestioCOF
These permissions concern pages, images, documents and access to the wagtail admin site. Only appropriate elements can be selected: only the kfet root page and its descendants, same for the kfet root collection (for images and documents), and kfet snippets (MemberTeam). Add django-formset-js as dependency to help manipulate formsets. K-Fêt groups created from "devdata" commands get suitable permissions for the CMS.
9 lines
160 B
Python
9 lines
160 B
Python
from django.template.defaulttags import register
|
|
|
|
|
|
@register.filter
|
|
def get(o, key):
|
|
if hasattr(o, 'get'):
|
|
return o.get(key)
|
|
return o[int(key)]
|