InstallationΒΆ
Get the package from pypi:
$ pip install django-model-event-actions
Subclass the models:
from django_model_event_actions.models import EventActionModel
class MyClass(EventActionModel):
...
Add the event decorator:
from django_model_event_actions.models import EventActionModel
class MyClass(EventActionModel):
name = models.CharField()
@PostCreateEvent(field='name'):
def my_handler(self):
# logic