Explain the purpose of the User model and the trade-offs between AbstractUser and AbstractBaseUser when customizing authentication.
Last updated
The
Usermodel stores credentials (hashed password), identity fields, and links to permissions/groups.AbstractUserkeeps all built-in fields so you just add or tweak a few.AbstractBaseUsergives only password handling andlast_login. You define all fields,USERNAME_FIELD, and a manager (addPermissionsMixinfor permissions). Use it for fundamentally different identity, e.g. email-only login.Set
AUTH_USER_MODELbefore the first migration because swapping it later is painful.
- https://www.interviewbit.com/django-interview-questions/
- https://www.scribd.com/document/911648753/Headout-Backend-Engineering-Interview-Questions-Bank-CLAUDE
- https://www.uplers.com/
- https://medium.com/@anas-issath/the-django-career-guide-from-junior-to-senior-fea1c3e52aa6
- https://www.quora.com/What-are-some-interview-questions-asked-or-can-be-asked-related-to-Django-and-Python
- https://www.reddit.com/r/developersIndia/
- https://internshala.com/blog/infosys-python-interview-questions/