﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32429	"Configurable ""always available"" InclusionNode context variables"	Michael Gisi	nobody	"Currently, the `csrf_token` is always added to the context of an inclusion tag. It would be useful to define a list of additional variables that should always be available in any context.

e.g. something like this defined in settings
{{{#!python
INCLUSION_CONTEXT_VARIABLES = ['idempotency_key', ]
}}}

and a few lines added to the `render` method of `InclusionNode`
{{{#!python
    def render(self, context):
        ...
        csrf_token = context.get('csrf_token')
        if csrf_token is not None:
            new_context['csrf_token'] = csrf_token
        for var in settings.INCLUSION_CONTEXT_VARIABLES:
            value = context.get(var)
            if value is not None:
                new_context[var] = value
        return t.render(new_context)
}}}"	New feature	closed	Template system	3.1	Normal	wontfix	context, inclusion tag, template		Unreviewed	0	0	0	0	0	0
