Is there any way to call django command after changing constance value? I need to call:
python manage.py installtasks
for my kronos cron jobs. I don't have any idea how can I set this. In constance docs I found:
from constance.signals import config_updated
@receiver(config_updated)
def constance_updated(sender, key, old_value, new_value, **kwargs):
print(sender, key, old_value, new_value)
but I don't know what is receiver (I get "NameError: name 'receiver' is not defined") and where should I put this code. Any help?
You could import the decorator,
from django.dispatch import receiver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With