From ff3b348771c07802b13c6a813ef6e4aed4e0b46c Mon Sep 17 00:00:00 2001 From: Sander Steffann Date: Fri, 22 May 2020 22:28:04 +0200 Subject: [PATCH] Add `csrf_token` to PluginTemplateExtension context --- netbox/extras/templatetags/plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netbox/extras/templatetags/plugins.py b/netbox/extras/templatetags/plugins.py index b66cce0a6..e63d25df1 100644 --- a/netbox/extras/templatetags/plugins.py +++ b/netbox/extras/templatetags/plugins.py @@ -18,6 +18,7 @@ def _get_registered_content(obj, method, template_context): 'object': obj, 'request': template_context['request'], 'settings': template_context['settings'], + 'csrf_token': template_context['csrf_token'], } model_name = obj._meta.label_lower