summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stapp/settings.py1
-rw-r--r--stapp/userprofile/models.py18
2 files changed, 17 insertions, 2 deletions
diff --git a/stapp/settings.py b/stapp/settings.py
index d05ec9d..a688151 100644
--- a/stapp/settings.py
+++ b/stapp/settings.py
@@ -127,6 +127,7 @@ INSTALLED_APPS = (
'south',
'video',
+ 'userprofile',
)
# A sample logging configuration. The only tangible logging
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
+
+
+
+