[Answered ]-Django admin login doesn't work without default backend

2👍

The Django admin site only allows access for users with the is_staff flag set to True.

As a one off, you can set the is_staff flag for a particular user through the shell:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username="fernando")
>>> u.is_staff = True
>>> u.save()

After making the above change, your user should be able to access the admin site.

For new users in future, you may want to subclass the RemoteUserBackend and override the configure_user method to set the is_staff flag where appropriate.

Leave a comment