This task involves creating a custom user model in the "core" app to store username, email, and password. This custom model will replace the default Django user model and provide more flexibility for future extensions.
Steps
Create the Custom User Model:
Define a custom user model in the "core" app that includes the fields username, email, and password.
Ensure the custom user model inherits from AbstractBaseUser and PermissionsMixin for authentication and permissions.
Update settings.py:
Update the AUTH_USER_MODEL setting in settings.py to point to the new custom user model.
Create a Custom User Manager:
Define a custom user manager to handle the creation of users and superusers.
Migrations:
Create and apply the necessary database migrations to accommodate the custom user model.
Admin Integration:
Register the custom user model with the Django admin site for easy management.
Testing:
Write tests to ensure the custom user model works as expected.
Test the creation of regular users and superusers.
Ensure authentication works with the custom user model.
Documentation:
Update the project documentation to reflect the changes made with the custom user model.
Include instructions on how to create and manage users using the new model.
Description
This task involves creating a custom user model in the "core" app to store
username
,email
, andpassword
. This custom model will replace the default Django user model and provide more flexibility for future extensions.Steps
Create the Custom User Model:
username
,email
, andpassword
.AbstractBaseUser
andPermissionsMixin
for authentication and permissions.Update settings.py:
AUTH_USER_MODEL
setting insettings.py
to point to the new custom user model.Create a Custom User Manager:
Migrations:
Admin Integration:
Testing:
Documentation:
Resources
Priority