diff options
author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-10 06:21:15 +0530 |
---|---|---|
committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-10 06:21:15 +0530 |
commit | e5dc1c48ea48177e21cff6670a2dbf0c4c4cf262 (patch) | |
tree | 8dd57320e742394034515158c013915595877c1a /hyperkitty/models.py | |
parent | 6da4589cf562033fba6e1f5d910a28dbe39dc313 (diff) | |
download | hyperkitty-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.py | 15 |
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)) |