From 0df97dfb7297d20adc09797ec3bb2c1563a6c47b Mon Sep 17 00:00:00 2001 From: juanifioren Date: Fri, 27 Mar 2015 14:42:41 -0300 Subject: [PATCH] Add choices to gender in UserInfo. --- oidc_provider/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oidc_provider/models.py b/oidc_provider/models.py index ca8371b..3e7c18b 100644 --- a/oidc_provider/models.py +++ b/oidc_provider/models.py @@ -80,12 +80,17 @@ class Token(models.Model): class UserInfo(models.Model): + GENDER_CHOICES = [ + ('F', 'Female'), + ('M', 'Male'), + ] + user = models.OneToOneField(User, primary_key=True) given_name = models.CharField(max_length=255, blank=True, null=True) family_name = models.CharField(max_length=255, blank=True, null=True) middle_name = models.CharField(max_length=255, blank=True, null=True) nickname = models.CharField(max_length=255, blank=True, null=True) - gender = models.CharField(max_length=100, default='', blank=True, null=True) + gender = models.CharField(max_length=100, choices=GENDER_CHOICES, null=True) birthdate = models.DateField(null=True) zoneinfo = models.CharField(max_length=100, default='', blank=True, null=True)