I have an app companies
. Inside the app there is a file called signals.py
with the following code:
post_save.connect(update_descendants, sender=Company)
Inside companies apps.py I have:
class CompaniesConfig(AppConfig):
name = 'apps.companies'
def ready(self):
from . import signals
But the signals are not imported/called.
If I import the file in models.py it work but it creates a circular import issue, and I need to this imports inside functions not at top.
Structure:
- companies
-apps
-models
-signals
Why app config is not working ?