From a4bf2658ce6474c1b8dc2d4f8997d8a4c508a1a3 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Mon, 28 Jan 2013 16:48:03 +0100 Subject: fix the favorites system --- hyperkitty/models.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hyperkitty/models.py') 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)) -- cgit