I'm not really experienced in Django and graph databases. But I need to set up user authentication with MongoDB in Django.
I'm using pymongo for connection to database bypassing Django db settings. But I still want to use Django authentication. In order to do so, I actually should create a user model extended from AbstractBaseUser
, create custom user manager extended from BaseUserManager
, and register AUTH_USER_MODEL
in settings.
I've also created and registered custom backend which returns my custom User
object.
But the problem is that it seems like Django tries to verify my User
model using its database (sqlite in settings) and it can't find USERNAME_FIELD
(because actually I'm not using this db. I don't know how to tell Django that it don't need to care about it.
Can you provide any suggestions, please?