Triggering events on model field change

17 views
Skip to first unread message

Lachlan Musicman

unread,
Jun 1, 2017, 8:15:34 PM6/1/17
to django...@googlegroups.com
Hola,

I have a model with a collection of BooleanFields.

When particular fields change value I'd like to trigger an event (usually email).

A quick search shows that there are questions like this back to 09.

The two most obvious and recent solutions involve using:

 - django's from_db (https://docs.djangoproject.com/en/1.11/ref/models/instances/#customizing-model-loading)
or
 - django-model-utils (https://django-model-utils.readthedocs.io/en/latest/setup.html)

Model utils doesn't support 1.11 but that could just be a documentation oversight.

What does the crowd think?

cheers
L.


------
"Mission Statement: To provide hope and inspiration for collective action, to build collective power, to achieve collective transformation, rooted in grief and rage but pointed towards vision and dreams."

 - Patrisse Cullors, Black Lives Matter founder
Reply all
Reply to author
Forward
0 new messages