DEV Community

Discussion on: Developing Restful APIs with Python, Django and Django Rest Framework

Collapse
 
ronjea profile image
Javier Borrego Cejudo • Edited

Hi Aditya you are able to change the auth model

docs.djangoproject.com/en/3.0/topi...

Where you are checking the password you can override this function.

def authenticate(self, request, username=None, password=None):
...
pwd_valid = check_password(password, settings.ADMIN_PASSWORD)
...

This is not recommendable and if you want someone to interact with the API or django itself you can create views where you do not need a token to create content.

Good Luck!