django customize the user model
- Create a new model that inherits from AbstractBaseUser.
- Define the required fields such as email and username as unique.
- Set the USERNAME_FIELD and REQUIRED_FIELDS in the new model.
- Create a new manager for the model that uses the UserManager class.
- Override the create_user and create_superuser methods in the manager.
- Update the AUTH_USER_MODEL setting in the settings.py file.
- Make and apply the migrations to create the new user model.