summaryrefslogtreecommitdiff
path: root/meetingtools/apps/userprofile
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-10-04 15:39:08 +0200
committerLeif Johansson <leifj@sunet.se>2012-10-04 15:39:08 +0200
commit2bdad0ae7a3a6e4ec5116becd39910388b679ed2 (patch)
tree5afdfba0a93c1af50d53bdc245d57cc4053e109a /meetingtools/apps/userprofile
parent873e7823970352d591deee5f67f47c5436ee0e84 (diff)
restructure
Diffstat (limited to 'meetingtools/apps/userprofile')
-rw-r--r--meetingtools/apps/userprofile/__init__.py0
-rw-r--r--meetingtools/apps/userprofile/admin.py4
-rw-r--r--meetingtools/apps/userprofile/models.py21
3 files changed, 25 insertions, 0 deletions
diff --git a/meetingtools/apps/userprofile/__init__.py b/meetingtools/apps/userprofile/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/meetingtools/apps/userprofile/__init__.py
diff --git a/meetingtools/apps/userprofile/admin.py b/meetingtools/apps/userprofile/admin.py
new file mode 100644
index 0000000..21ca598
--- /dev/null
+++ b/meetingtools/apps/userprofile/admin.py
@@ -0,0 +1,4 @@
+from django.contrib import admin
+from meetingtools.apps.userprofile.models import UserProfile
+
+admin.site.register(UserProfile) \ No newline at end of file
diff --git a/meetingtools/apps/userprofile/models.py b/meetingtools/apps/userprofile/models.py
new file mode 100644
index 0000000..b0bc7ae
--- /dev/null
+++ b/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)