summaryrefslogtreecommitdiffstats
path: root/hyperkitty/models.py
diff options
context:
space:
mode:
authorAamir Khan <syst3m.w0rm@gmail.com>2012-08-10 06:21:15 +0530
committerAamir Khan <syst3m.w0rm@gmail.com>2012-08-10 06:21:15 +0530
commite5dc1c48ea48177e21cff6670a2dbf0c4c4cf262 (patch)
tree8dd57320e742394034515158c013915595877c1a /hyperkitty/models.py
parent6da4589cf562033fba6e1f5d910a28dbe39dc313 (diff)
downloadhyperkitty-e5dc1c48ea48177e21cff6670a2dbf0c4c4cf262.tar.gz
hyperkitty-e5dc1c48ea48177e21cff6670a2dbf0c4c4cf262.tar.xz
hyperkitty-e5dc1c48ea48177e21cff6670a2dbf0c4c4cf262.zip
Feature : Add tag to email threads
Diffstat (limited to 'hyperkitty/models.py')
-rw-r--r--hyperkitty/models.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/hyperkitty/models.py b/hyperkitty/models.py
index f1bc196..dc1bcb4 100644
--- a/hyperkitty/models.py
+++ b/hyperkitty/models.py
@@ -59,7 +59,7 @@ class UserProfile(models.Model):
"Returns all the votes by a user"
# Extract all the votes by this user
try:
- votes = Rating.objects.filter(user = self.user)
+ votes = Rating.objects.filter(user=self.user)
except Rating.DoesNotExist:
votes = {}
@@ -75,3 +75,16 @@ class UserProfile(models.Model):
def __unicode__(self):
"""Unicode representation"""
return u'%s' % (unicode(self.user))
+
+class Tag(models.Model):
+ # @TODO: instead of list_address, user list model from kittystore?
+ list_address = models.CharField(max_length=50)
+
+ # @TODO: instead of threadid, use thread model from kittystore?
+ threadid = models.CharField(max_length=100)
+
+ tag = models.CharField(max_length=255)
+
+ def __unicode__(self):
+ """Unicode representation"""
+ return u'threadid = %s , tag = %s ' % (unicode(self.list_address), unicode(self.threadid))