from django.utils.translation import ugettext as _
from forum.models.action import ActionProxy
from forum.models import Comment, Question, Answer, NodeRevision
-import logging
+from forum import settings, REQUEST_HOLDER
+
+from django.contrib import messages
class NodeEditAction(ActionProxy):
def create_revision_data(self, initial=False, **data):
question.save()
self.node = question
- self.user.message_set.create(message=self.describe(self.user))
+ messages.info(REQUEST_HOLDER.request, self.describe(self.user))
def describe(self, viewer=None):
return _("%(user)s asked %(question)s") % {
def process_action(self):
self.node.question.reset_answer_count_cache()
- self.user.message_set.create(message=self.describe(self.user))
+ messages.info(REQUEST_HOLDER.request, self.describe(self.user))
def describe(self, viewer=None):