summaryrefslogtreecommitdiffstats
path: root/hyperkitty/models.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-01-28 16:48:03 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-01-28 16:48:03 +0100
commita4bf2658ce6474c1b8dc2d4f8997d8a4c508a1a3 (patch)
treef29b7f89faff32d99387da43b6a5825d3f5f0f07 /hyperkitty/models.py
parentfd1616185405265189dc6d5ce70cc6c16456088c (diff)
downloadhyperkitty-a4bf2658ce6474c1b8dc2d4f8997d8a4c508a1a3.tar.gz
hyperkitty-a4bf2658ce6474c1b8dc2d4f8997d8a4c508a1a3.tar.xz
hyperkitty-a4bf2658ce6474c1b8dc2d4f8997d8a4c508a1a3.zip
fix the favorites system
Diffstat (limited to 'hyperkitty/models.py')
-rw-r--r--hyperkitty/models.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/hyperkitty/models.py b/hyperkitty/models.py
index 40eb9e3..370908f 100644
--- a/hyperkitty/models.py
+++ b/hyperkitty/models.py
@@ -67,4 +67,14 @@ class Tag(models.Model):
def __unicode__(self):
"""Unicode representation"""
- return u'threadid = %s , tag = %s ' % (unicode(self.list_address), unicode(self.threadid))
+ return u'threadid = %s , tag = %s ' % (unicode(self.threadid), unicode(self.tag))
+
+
+class Favorite(models.Model):
+ list_address = models.CharField(max_length=50)
+ threadid = models.CharField(max_length=100)
+ user = models.ForeignKey(User)
+
+ def __unicode__(self):
+ """Unicode representation"""
+ return u'thread %s for user %s' % (unicode(self.threadid), unicode(self.user))