from django.core.mail import send_mail
from django.db.models.signals import post_save, pre_save
def create_thumbnail(sender, instance, **kwargs):
send_mail('pre', 'Here is the message.', None, ['mail@mail.com'], fail_silently=False)
pre_save.connect(create_thumbnail, sender=New)
def create_thumbnail(sender, instance, **kwargs):
send_mail('before', 'Here is the message.', None, ['mail@mail.com'], fail_silently=False)
post_save.connect(create_thumbnail, sender=New)
Почему не ”ловится" первая функция
Спасибо.