diff options
author | radhikam | 2012-06-20 16:34:21 +0530 |
---|---|---|
committer | radhikam | 2012-06-20 16:34:21 +0530 |
commit | 1bba81b0ddd46c665a492aa76e873b25c10a39f7 (patch) | |
tree | 9d85dac67e962555683bbe795e4ab4c3114cb755 /stapp | |
parent | 0cfa5f912b760411b9c3237a36f5072051c72f7c (diff) | |
download | stproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.tar.gz stproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.tar.bz2 stproject-1bba81b0ddd46c665a492aa76e873b25c10a39f7.zip |
added userprofile to INSTALLED_APPS
Diffstat (limited to 'stapp')
-rw-r--r-- | stapp/settings.py | 1 | ||||
-rw-r--r-- | stapp/userprofile/models.py | 18 |
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 + + + + |