diff options
Diffstat (limited to 'src/meetingtools/apps/userprofile/models.py')
-rw-r--r-- | src/meetingtools/apps/userprofile/models.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/meetingtools/apps/userprofile/models.py b/src/meetingtools/apps/userprofile/models.py new file mode 100644 index 0000000..b0bc7ae --- /dev/null +++ b/src/meetingtools/apps/userprofile/models.py @@ -0,0 +1,21 @@ +''' +Created on Jul 5, 2010 + +@author: leifj +''' +from django.db import models +from django.contrib.auth.models import User + +class UserProfile(models.Model): + user = models.ForeignKey(User,blank=True,related_name='profile') + display_name = models.CharField(max_length=255,blank=True) + email = models.EmailField(blank=True) + idp = models.CharField(max_length=255) + timecreated = models.DateTimeField(auto_now_add=True) + lastupdated = models.DateTimeField(auto_now=True) + + def __unicode__(self): + return "%s - %s" % (self.user.username,self.display_name) + +def profile(user): + return UserProfile.objects.get(user=user) |