Explain the purpose of the User model and the trade-offs between AbstractUser and AbstractBaseUser when customizing authentication.

Last updated 17 June 2026

  • The User model stores credentials (hashed password), identity fields, and links to permissions/groups. AbstractUser keeps all built-in fields so you just add or tweak a few.

  • AbstractBaseUser gives only password handling and last_login. You define all fields, USERNAME_FIELD, and a manager (add PermissionsMixin for permissions). Use it for fundamentally different identity, e.g. email-only login.

  • Set AUTH_USER_MODEL before 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/
All Django interview questions