이것은 처음으로 django 신호로 작업하는 것이며 의견이 플래그가 붙었을 때 알림 앱에서 제공하는 "comment_was_flagged"신호를 전달하고 싶습니다.Django "comment_was_flagged"signal
이것은 내 코드이지만 작동하지 않는 것 같습니다. 뭔가 빠졌습니까?
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', '[email protected]', ['[email protected]',])
comment_was_flagged.connect(comment_flagged_notification)
는 (난 그냥 지금 이메일을 테스트입니다,하지만 나는 이메일이 제대로 전송하는 확신했다.)
감사합니다!