[Answer]-Mailto in Django Admin

1👍

You could add an boolean field “email_on_save” and a text field for the “message”. When the record gets saved in the admin it calls the Model.save() method.

You extend the model.save() this way:


def save(self, *args, **kwargs):
    if self.email_on_save:
        send_email(self.email, self.message)
    self.email_on_save = False
    self.message = ""
    # Call super save method
    return super(MyModel, self).save(*args, **kwargs)

Leave a comment