1👍
✅
i don’t think request object is part of the default context values.
check your template_context_processors in your settings and if you add django.core.context_processors.request in that list then the current request will be added to every requestcontext. or just pass the request manually for that view.
https://docs.djangoproject.com/en/1.5/ref/templates/api/#django-core-context-processors-request
Source:stackexchange.com