Warning
Django’s comment framework has been deprecated and is no longer supported. Most users will be better served with a custom solution, or a hosted product like Disqus.
The code formerly known as django.contrib.comments is still available
in an external repository.
The comment app sends a series of signals to allow for comment moderation and similar activities. See the introduction to signals for information about how to register for and receive these signals.
django.contrib.comments.signals.comment_will_be_posted¶Sent just before a comment will be saved, after it’s been sanity checked and submitted. This can be used to modify the comment (in place) with posting details or other such actions.
If any receiver returns False the comment will be discarded and a 400
response will be returned.
This signal is sent at more or less the same time (just before, actually) as the
Comment object’s pre_save signal.
Arguments sent with this signal:
sendercommentrequestHttpRequest that posted the comment.django.contrib.comments.signals.comment_was_posted¶Sent just after the comment is saved.
Arguments sent with this signal:
sendercommentsave() again.requestHttpRequest that posted the comment.django.contrib.comments.signals.comment_was_flagged¶Sent after a comment was “flagged” in some way. Check the flag to see if this was a user requesting removal of a comment, a moderator approving/removing a comment, or some other custom user flag.
Arguments sent with this signal:
sendercommentsave() again.flagdjango.contrib.comments.models.CommentFlag that’s been attached to
the comment.createdTrue if this is a new flag; False if it’s a duplicate flag.requestHttpRequest that posted the comment.Oct 12, 2015