I have configured some django signals on the pre_delete
, post_save
and pre_delete
receivers for some models which are stored in a signals.py
file in the same package as the models.
Saving from an API call or directly in the terminal triggers the signals but when saving from the Admin dashboard they are not fired.
I have imported the signals in the ready()
method of the AppConfig
which changes nothing.
Any help on this issue?
PS: Using django-oscar if that helps.
from django.db.models.signals import post_delete, post_save, pre_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
MyModel = get_model('mypackage', 'MyModel')
@receiver(post_save, sender=MyModel)
def do_stuff(sender, instance=None, created=False, **kwargs):
update_stuff()