B
B
Boldy2014-11-21 13:22:29
Django
Boldy, 2014-11-21 13:22:29

On production django, when trying to login to the admin panel: please correct the errors below (login and password are correct). What could be the problem?

The problem is only on the hosting, everything is fine with me. The admin account is authorized without any problems as auth_user (along with ordinary mortal users). The admin panel says "Please fix the errors below."
URLs.py:

url(r'^admin/', include(admin.site.urls)),
                       url(r'^grappelli/', include('grappelli.urls')),
                       url(r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'login.html'},),
                       url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login'),
                       url(r'^', include('django.contrib.flatpages.urls')),

Before that, removed from MIDDLEWARE_CLASSES
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',

UPD:
You can now login by disabling grappelli thanks to the admin.autodiscover() line in urls.py. Grappelli still asks to correct the mistakes that are not there.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question