Django - custom user model

Django Tip:

Use a custom user model when starting a project

When starting a new project, set up a custom user model. This model behaves just like the default user model, but you'll be able to customize it in the future.

# users/

from django.contrib.auth.models import AbstractUser

class CustomUser(AbstractUser):

# users/

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from .models import CustomUser, UserAdmin)


AUTH_USER_MODEL = "users.CustomUser"