[Answer]-Django: I am not able to login to admin when using context_processor.request

1👍

You need to add the remaining context processors that are there by default. In your snippet, you have removed all the other context processors, and just set it to request, which is why admin is not working.

You should add the remaining default context processors, in addition to the request processor:

TEMPLATE_CONTEXT_PROCESSORS = ("django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.request",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages")

The django settings reference lists the defaults for all django settings.

Leave a comment