Search code examples
djangodjango-admindjango-grappelli

django admin login failure with valid user


I've just created a new django app but am unable to log into the (grappelli) admin with a valid superuser. I've checked the user in the shell -

>>> from django.contrib.auth import authenticate
>>> user = authenticate(username='admin', password='admin')
>>> user.is_active and user.is_superuser
True

When I enter the same credentials at localhost:8000/admin I get an error message saying 'Please correct the errors below'. However no errors are listed

broken login

I noticed that there's no session being created in the django_sessions table when I try and login using the browser (there are sessions created for the shell login above).

I'm using django 1.6.2 with grappelli and running this on django's dev webserver.


Solution

  • If you want to login into django admin you should checked below options.

    is_superuser  is True 
    or
    is_staff  is True
    

    for the user you are login .

    EDIT
    try to uninstall grappelli and then login into django admin.