Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def save(self, *args, **kwargs):
- if self.pk:
- deuda_actual = Enterprise.objects.get(pk=self.pk).ammount_of_doubt
- if self.has_doubt:
- if self.ammount_of_doubt != deuda_actual:
- should_send_email = True
- else:
- should_send_email = self.has_doubt
- if should_send_email:
- #if self.ammount_of_doubt != deuda_actual:
- mensaje = """Hola asdasda """"
- send_mail('Notificacion',mensaje,'misclientes@pescatun.alinet.cu', [self.email],
- fail_silently=True,)
- #template = get_template("clientes.html").render()
- #notification.attach(template, "text/html")
- self.emailed = True
- super(Enterprise, self).save(*args, **kwargs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement