摆脱Satchmo / Django中的默认视图?

时间:2012-11-08 09:00:10

标签: python django satchmo

只是好奇什么是正确/透明的方式来获取普通的404错误而不是查看预定义的网址?

Satchmo的默认安装使用购物车视图处理/quickorder网址。我想完全禁用此网址的处理。到目前为止,我确实得到了商店树顶部的 url.py 中的以下网址替换:

from django.conf.urls.defaults import *
from satchmo_store.urls import urlpatterns
from satchmo_utils.urlhelper import replace_urlpattern

replace_urlpattern(
        urlpatterns,
        url(r'^quickorder/$', handler404)
    )

handler404来自django.conf.urls.defaults,但它会返回Django自己的内容,而不是商店的默认404页面,就好像你要求一个不存在的页面一样http://www.google.com/quickorder_somenonsenseintheurl。 / p>

知道如何在避免修改默认Satchmo安装的同时覆盖它吗?

0 个答案:

没有答案