Where to put signal handler file ?

18 views
Skip to first unread message

Benj

unread,
Jan 22, 2016, 10:09:47 AM1/22/16
to Django users
Since I follow the recommended way of creating signal, I create a signals.py file in a project's app, an app.py config file, and initialize that in __init__.
@receiver(pre_delete, dispatch_uid='document_delete_signal') 

But what if I don't want this to be tied to a specific app in the project, but intercept any pre_delete for all models and apps ? Where should I put and configure signals.py, app.py and which __iniy__ ?

Thanks

Benj

unread,
Jan 22, 2016, 4:11:16 PM1/22/16
to Django users
Answer: create a django app for such utility: you will be able to use app features decoupled from specific model
Reply all
Reply to author
Forward
0 new messages