Django was kicking my ass tonight, as I struggled to figure out how to reference HttpRequest parameters in templates. It’s 2:00AM and I finally arrived at an answer - default TEMPLATE_CONTEXT_PROCESSORS in settings.py is missing “django.core.context_processors.request”. You can override the settings by explicitly setting it in settings.py:

TEMPLATE_CONTEXT_PROCESSORS = (
“django.core.context_processors.auth”,
“django.core.context_processors.debug”,
“django.core.context_processors.i18n”,
“django.core.context_processors.request”,
)

Above settings change enables HttpRequest by this function in the context_processor.py:

def request(request):
return {’request’: request}