Where to Disconnect()Satchm中的“default_product_search_listener”
回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我不想使用默认的Satchmo搜索侦听器。我创建了自己的搜索侦听器。在</p>
<p>断开默认搜索侦听器的最佳位置在哪里?在</p>
<pre><code># 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)
</code></pre>
<p>我试图在我的应用程序的<code>__init__.py</code>和我的应用程序的<code>models.py</code>中执行,但这两个程序似乎都是在Satchmo发出信号之前运行的,所以它们不能正确地断开连接。我可以在哪里运行断开连接的代码,这样就可以确保Satchmo已经连接了它的侦听器?在</p>