user_model_swapped
Clears the application cache and updates the UserModel reference across various Django auth modules when the AUTH_USER_MODEL setting is changed.
def user_model_swapped(
setting: string,
**kwargs: dict
) - > null
Updates internal Django auth references when the AUTH_USER_MODEL setting is changed, ensuring that backends, forms, and management commands use the newly defined user model.
Parameters
| Name | Type | Description |
|---|---|---|
| setting | string | The name of the Django setting that was modified. |
| **kwargs | dict | Additional keyword arguments passed by the setting_changed signal dispatcher. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; this function performs side effects by updating module-level variables and clearing the app cache. |