def new_comment_created(sender, **kwargs): comment = kwargs['instance'] post = comment.post if kwargs.get('raw'): # Don't run during loaddata return if not kwargs['created']: return # We don't need to notify a topic poster of an edit. if comment.author == post.author: return # We don't need to tell someone they replied to themselves messages.new_comment_created(comment)
def new_comment_created(message, **kwargs): comment = safe_object(message) if comment: messages.new_comment_created(comment)
def new_comment_created(message, **kwargs): comment = safe_object(message) post = comment.post messages.new_comment_created(recipient=post.author, comment=comment)