1👍
✅
You need to use the template.Variable
class to create a template variable that then has a resolve
method for retrieving the value from the context
def render(self, context):
request = template.Variable('request').resolve(context)
...
Source:stackexchange.com