These changes refactor views to enhance organization, reuse, and readability. Introduce mixins for improved modularity in authentication-related functionalities. Serializers and views have been revamped to leverage these mixins, resulting in a cleaner and more structured.
Key changes include:
Replace duplicate code in serializers with newly introduces mixins:
ValidatePasswordMixin: Includes methods for password validation and ensuring password match.
CreateUserMixin: Facilitates user creation with role assignment.
TokenHandlerMixin: Manages blacklisting of refresh tokens.
send_confirmation_email and send_password_recovery_email have been consolidated into the send_user_email function for streamlined user-related actions.
These changes refactor views to enhance organization, reuse, and readability. Introduce mixins for improved modularity in authentication-related functionalities. Serializers and views have been revamped to leverage these mixins, resulting in a cleaner and more structured.
Key changes include:
Replace duplicate code in serializers with newly introduces mixins:
ValidatePasswordMixin
: Includes methods for password validation and ensuring password match.CreateUserMixin
: Facilitates user creation with role assignment.TokenHandlerMixin
: Manages blacklisting of refresh tokens.send_confirmation_email
andsend_password_recovery_email
have been consolidated into thesend_user_email
function for streamlined user-related actions.