-
-
Save brunomichetti/1ee6bb40c7f3aecc581782fcc0729bf9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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