summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorradhikam2012-06-20 16:34:21 +0530
committerradhikam2012-06-20 16:34:21 +0530
commit1bba81b0ddd46c665a492aa76e873b25c10a39f7 (patch)
tree9d85dac67e962555683bbe795e4ab4c3114cb755
parent0cfa5f912b760411b9c3237a36f5072051c72f7c (diff)
downloadstproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.tar.gz
stproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.tar.bz2
stproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.zip
added userprofile to INSTALLED_APPS
-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
+
+
+
+