15👍
✅
The code is fine. The problem is you’re using the RemoteUserBackend exclusively, instead of the default backend:
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.RemoteUserBackend',
)
I’ve never used it myself, but from the docs it’s clear that it’ll only check for a REMOTE_USER header in your requests, thus making your password login attempts irrelevant.
You could add the default ModelBackend as a fallback, if you wan’t to have both available:
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.RemoteUserBackend',
'django.contrib.auth.backends.ModelBackend',
)
or get rid of the RemoteUserBackend alltogether and have your app authenticate the default way.
Hope this helps.
- How to find out whether a model's column is a foreign key?
- Django – Search related fields
- VS Code: Python Interpreter can't find my venv
- Django Can't Find My Templates
1👍
Make sure you Super User is associated to one of the profiles you have created, maybe by iserting it manually intro you DB.
Take care
Source:stackexchange.com