Django signals not working properly

前端 未结 3 1669
你的背包
你的背包 2020-12-19 11:22

I\'m trying to setup a signal so that when a valid form is saved, a function is ran to carry out a related task.

My app structure is as follows;

- ev         


        
3条回答
  •  梦毁少年i
    2020-12-19 11:52

    I think maybe you just need to import your helpers/status.py eg in models/__init__.py

    otherwise your event_status signal gets defined ok but the signal handler create_status never gets connected by Django

    if you only have one handler for that signal it might make sense to put it in the same module as the signal definition

提交回复
热议问题