Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django customize the user model

from django.contrib.auth.models import User

class Employee(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    department = models.CharField(max_length=100)
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #django #customize #user #model
ADD COMMENT
Topic
Name
4+3 =