diff options
author | Leif Johansson <leifj@sunet.se> | 2010-07-06 21:55:44 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2010-07-06 21:55:44 +0200 |
commit | 7921132788e55c0714af8b33ed2105ff6a1dba54 (patch) | |
tree | df995bce2c95830ccace570e3ec059232fef3ac4 /coip/apps/userprofile/models.py | |
parent | 7698ee1fe6bd40108fbe48bb641ea99a5b8f2bef (diff) |
cleanup and working membership list
Diffstat (limited to 'coip/apps/userprofile/models.py')
-rw-r--r-- | coip/apps/userprofile/models.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/coip/apps/userprofile/models.py b/coip/apps/userprofile/models.py new file mode 100644 index 0000000..2387e36 --- /dev/null +++ b/coip/apps/userprofile/models.py @@ -0,0 +1,30 @@ +''' +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,null=True,related_name='profiles') + display_name = models.CharField(max_length=255,blank=True,null=True) + email = models.EmailField(blank=True,null=True) + idp = models.CharField(max_length=255,blank=True,null=True) + identifier = models.CharField(max_length=1023,unique=True) + timecreated = models.DateTimeField(auto_now_add=True) + lastupdated = models.DateTimeField(auto_now=True) + + def __unicode__(self): + return "%s [%s] - %s" % (self.identifier,self.user.username,self.display_name) + +class PKey(models.Model): + user_profile = models.ForeignKey(UserProfile,related_name='keys') + key = models.CharField(max_length=1023,unique=True) + timecreated = models.DateTimeField(auto_now_add=True) + lastupdated = models.DateTimeField(auto_now=True) + + def __unicode__(self): + return "A merge-key for "+self.user_profile + +
\ No newline at end of file |