How to save a model without sending a signal?

前端 未结 6 2115
名媛妹妹
名媛妹妹 2021-02-06 23:23

How can I save a model, such that signals arent sent. (post_save and pre_save)

6条回答
  •  爱一瞬间的悲伤
    2021-02-07 00:00

    This ticket has been marked as "wontfix" because:

    In short, it sounds like, given the defined purpose of signals, it is the attached signal handler that needs to become more intelligent (like in davedash's suggestion), rather than the code that emits the signal. Disabling signals is just a quick fix that will work when you know exactly what handlers are attached to a signal, and it hides the underlying problem by putting the fix in the wrong place.

提交回复
热议问题