コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
def new_comment_created(message, **kwargs):
    comment = safe_object(message)
    if comment:
        messages.new_comment_created(comment)
コード例 #4
0
def new_comment_created(message, **kwargs):
    comment = safe_object(message)
    post = comment.post
    messages.new_comment_created(recipient=post.author, comment=comment)
コード例 #5
0
def new_comment_created(message, **kwargs):
    comment = safe_object(message)
    if comment:
        messages.new_comment_created(comment)