Unable To Login To The Admin Panel In Django
The site is working fine but when I switch to http://127.0.0.1:8000/admin/ it shows AttributeError at /admin/ .I tried to include MIDDLEWARE_CLASSES in the mysite/settings.py but t
Solution 1:
You should know that altering the order of the middlewares can cause serious problems, which it did in your case.
So my advice to you is to add your apps at the end of the INSTALLED_APPS and create a new django project and replace your middlewares list with the middlewares list of the newly created project or try with these
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
]
Post a Comment for "Unable To Login To The Admin Panel In Django"