Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

djago custom user

AUTH_USER_MODEL = 'app_name.UserModel' #in settings.py file

# in app_name models.py
from django.contrib.auth.models import AbstractUser
class UserModel(AbstractUser):
  pass

# run python manage.py makemigrations, and migrate
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #djago #custom #user
ADD COMMENT
Topic
Name
9+5 =