Django "comment_was_flagged" signal
- by tsoporan
Hello,
This is my first time working with django signals and I would like to hook the "comment_was_flagged" signal provided by the comments app to notify me when a comment is flagged.
This is my code, but it doesn't seem to work, am I missing something?
from django.contrib.comments.signals import comment_was_flagged
from django.core.mail import send_mail
def comment_flagged_notification(sender, **kwargs):
send_mail('testing moderation', 'testing', 'test@localhost', ['[email protected]',])
comment_was_flagged.connect(comment_flagged_notification)
(I am just testing the email for now, but I have assured the email is sending properly.)
Thanks!