forked from data.coop/membersystem
Fetch permissions before rendering templates.
This commit is contained in:
parent
a098a0b032
commit
f99c7ee698
|
@ -120,4 +120,9 @@ def render(request, template_name, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
context = base_context(request) | context
|
context = base_context(request) | context
|
||||||
|
|
||||||
|
# Make sure to fetch all permissions before rendering the template
|
||||||
|
# otherwise django-zen-queries will complain about database queries.
|
||||||
|
request.user.get_all_permissions()
|
||||||
|
|
||||||
return zen_queries_render(request, template_name, context)
|
return zen_queries_render(request, template_name, context)
|
||||||
|
|
Loading…
Reference in a new issue