Difference between AbstractUser and AbstractBaseUser in Django?

260 viewsDjango

Difference between AbstractUser and AbstractBaseUser in Django?

The use of AbstractUser and AbstractBaseUser looks quite similar.

from django.contrib.auth.models import AbstractUser, AbstractBaseUser


What is the difference between the two?

Farjanul Changed status to publish July 19, 2022
0

The documentation explains this fully. AbstractUser is a full User model, complete with fields, as an abstract class so that you can inherit from it and add your own profile fields and methods. AbstractBaseUser only contains the authentication functionality, but no actual fields: you have to supply them when you subclass.

Farjanul Changed status to publish July 19, 2022
0
You are viewing 1 out of 1 answers, click here to view all answers.