diff options
author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-07-05 11:53:09 -0400 |
---|---|---|
committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-07-05 11:53:09 -0400 |
commit | 3db8dd7d9328e38fbc8eacf0f7553778bc31d94f (patch) | |
tree | ace66373e47453b92f8c7b7e51aae9c3c7e9c836 /models.py | |
parent | e39e81586dd268ce0cc5009f1c4b32a6985f8274 (diff) | |
download | hyperkitty-3db8dd7d9328e38fbc8eacf0f7553778bc31d94f.tar.gz hyperkitty-3db8dd7d9328e38fbc8eacf0f7553778bc31d94f.tar.xz hyperkitty-3db8dd7d9328e38fbc8eacf0f7553778bc31d94f.zip |
Display message snippet on user profile page
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,7 +1,13 @@ from django.db import models from django.contrib.auth.models import User +from django.conf import settings + +from kittystore.kittysastore import KittySAStore + from gsoc.utils import log +STORE = KittySAStore(settings.KITTYSTORE_URL) + class Rating(models.Model): # @TODO: instead of list_address, user list model from kittystore? @@ -36,6 +42,11 @@ class UserProfile(models.Model): except Rating.DoesNotExist: votes = {} + for vote in votes: + list_name = vote.list_address.split('@')[0] + message = STORE.get_email(list_name, vote.messageid) + vote.message = message + return votes votes = property(_get_votes) |