【发布时间】:2011-03-26 01:34:23
【问题描述】:
我不想使用默认 Satchmo 搜索侦听器。我创建了自己的搜索侦听器。
断开默认搜索侦听器的最佳位置在哪里?
# This is what I need to do...
from satchmo_store.shop.listeners import default_product_search_listener
application_search.disconnect(default_product_search_listener, sender=Product)
我试图在我的应用程序的 __init__.py 和我的应用程序的 models.py 中执行此操作,但它们似乎都在运行 之前 Satchmo 实际上是 connect s 信号,所以他们没有正确断开连接。我可以在哪里运行我的断开连接代码,这样我才能确定 Satchmo 已经连接了它的监听器?
【问题讨论】: