Skip to content

๐Ÿ”ง swap models

Basic functionality provided by this package includes user models with phone or email as username. Email and Phone

To use specified model follow the steps below.

Step 1 - change INSTALLED_APPS

Add the following apps below to INSTALLED_APPS in order to swap to the specified model.

"swap_user",
"swap_user.to_email",
"swap_user",
"swap_user.to_phone",

Step 2 - change AUTH_USER_MODEL

AUTH_USER_MODEL = "swap_to_email.EmailUser"
AUTH_USER_MODEL = "swap_to_phone.PhoneUser"

Step 3 - apply migrations

python manage.py migrate swap_to_email
python manage.py migrate swap_to_phone