diff options
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) |