About Triggering Signals Manually

To trigger signals manually, for example, to update the ElasticSearch index for a model, you can do this:

1
2
3
4
from django.db import models
models.signals.post_save.send(
    sender=MyModel, instance=my_instance, created=False
)

Tips and Tricks Programming Django 3.x Django 2.2 Django 1.11 Django 1.8