Skip to content

Instantly share code, notes, and snippets.

@brunomichetti
Created July 1, 2022 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunomichetti/1ee6bb40c7f3aecc581782fcc0729bf9 to your computer and use it in GitHub Desktop.
Save brunomichetti/1ee6bb40c7f3aecc581782fcc0729bf9 to your computer and use it in GitHub Desktop.
# models.py in the users Django app
from django.db import models
from django.contrib.auth.models import AbstractUser
GENDER_SELECTION = [
('M', 'Male'),
('F', 'Female'),
('NS', 'Not Specified'),
]
class CustomUser(AbstractUser):
# We don't need to define the email attribute because is inherited from AbstractUser
gender = models.CharField(max_length=20, choices=GENDER_SELECTION)
phone_number = models.CharField(max_length=30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment