Does a Django RequestContext have a way to get the HttpRequest object with which it is associated with? Does it have a method like get_request() or the like to get the request which is passed into the constructor? I need to reference it from a method in which I only receive the RequestContext.
Add 'django.core.context_processors.request' to TEMPLATE_CONTEXT_PROCESSORS settings. And get request where context is available using :
request = context['request']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With