AbstractUser vs AbstractBaseUser vs User extended profile in Django Table of Contents
Social Share:
Sunday, January 19, 2025 at 5:03 PM | 1 min read
Last modified on Thursday, June 11, 2026 at 6:06 PM
#fullstack development, #macOS, #django, #python3, #abstractuser, #abstractbaseuser, #admin, #forms, #model manager, #tests, #unittest, #user model, #schema, #series, #superuser

Photo by David Clode on unsplash.com
This is the table of contents for my series on Django user models. I'll add new parts to this series as they are published.
Table of Contents
-
AbstractUser vs AbstractBaseUser vs User extended profile in Django Part 1: In this post, I create a top-level directory to house a new Django project, create a virtual environment for it, activate the virtual environment, install Django, create a requirements.txt file, create a new project, create a new app called users with AbstractBaseUser, add tests, break down what the code in the tests mean, discuss the User Model Manager, configure settings.py to use the new CustomUser class, apply migrations to users, view the schema resulting from the migrations, create a superuser, create CustomUserCreationForm and CustomUserChangeForm forms, and tell the admin to use these forms by subclassing UserAdmin in users/admin.py.
-
AbstractUser vs AbstractBaseUser vs User extended profile in Django Part 2: In this post, I create the custom-abstract-user-model local Git repository, create the config project and users app, add users app to INSTALLED_APPS in settings.py, add tests, create a file called managers.py inside the users app and add a CustomUserManager class to it, discuss what its code does, create the CustomUser class in users/models.py, subclassing AbstractUser, add AUTH_USER_MODEL set to users.CustomUser, check to see what our migrations will look like before actually applying them, make and apply migrations, discuss what the python3 manage.py makemigrations and python3 manage.py migrate commands do, create the superuser, create CustomUserCreationForm and CustomChangeForm, subclassing UserCreationForm and CustomUserChangeForm so they use the new CustomUser model, and tell the admin to use our forms by subclassing UserAdmin in users/admin.py.