summaryrefslogtreecommitdiff
path: root/stapp/userprofile
diff options
context:
space:
mode:
Diffstat (limited to 'stapp/userprofile')
-rw-r--r--stapp/userprofile/models.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/stapp/userprofile/models.py b/stapp/userprofile/models.py
index 1e3de8b..0c0f568 100644
--- a/stapp/userprofile/models.py
+++ b/stapp/userprofile/models.py
@@ -1,10 +1,24 @@
from django.db import models
-from django.contrib.auth.models impport User
+from django.contrib.auth.models import User
+
+GENDER_CHOICES = (
+ ('Female', 'Female'),
+ ('Male' , 'Male'),
+ )
# Create your models here.
class UserProfile(models.Model):
- user = models.ForeignKey(User, unique=True)
+ user = models.OneToOneField(User, unique=True)
+ dob = models.DateField(auto_now=False)
+ gender = models.CharField(max_length=6, choices=GENDER_CHOICES)
+
+ def __unicode__(self):
+ return u"%s the place" % self.user.username
+
+
+
+