]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/actions/user.py
Access request trough singleton where necessarry
[osqa.git] / forum / actions / user.py
index 3e1721bd36a7284c541bdad0c8af4027d50e398c..5a6aba5ec7918ccd28215684a2a93f498c20deb5 100644 (file)
@@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse
 from django.db.models import F
 from forum.models.action import ActionProxy
 from forum.models import Award, Badge, ValidationHash, User
-from forum import settings
+from forum import settings, REQUEST_HOLDER
 from forum.settings import APP_SHORT_NAME
 from forum.utils.mail import send_template_email
 
@@ -78,7 +78,7 @@ class BonusRepAction(ActionProxy):
                     message=_("Congratulations, you have been awarded an extra %s reputation points.") % self._value +
                     '<br />%s' % self.extra.get('message', _('Thank you')))
         else:
-            messages.info(request, _("You have penalized %s in %s reputation points.") % (self._affected, self._value) +
+            messages.info(REQUEST_HOLDER.request, _("You have penalized %s in %s reputation points.") % (self._affected, self._value) +
                     '<br />%s' % self.extra.get('message', ''))
 
     def describe(self, viewer=None):