Skip to content Skip to sidebar Skip to footer

Django Authenticate Method Not Working On Custom Model

I am trying the build in method authenticate() to login employees but that does not seem to work. I have not used the default model User provided by django instead I have used my o

Solution 1:

I think you shouldn't do that. Django already has a User infrastructure and to use functions like authenticate, you need to inherit one of the AbstractUser or AbstractBaseUser classes. If you just define models like that, you have to do a lot of the work that Django has already done, and I definitely don't recommend it. I leave some helpful documentation and articles below. If you need any help, write a comment and I can help as best I can.

Official Django Doc Customizing authentication

Custom User Model

How to Extend User Model

Post a Comment for "Django Authenticate Method Not Working On Custom Model"