0
我想爲django-cms和cmsplugin-zinnia設置默認的Django錯誤處理程序,但由於某種原因,我無法將它捨棄。每一個我在不存在輸入URL時,我得到了默認的錯誤消息django-cmz - cmsplugin_zinnia - 錯誤模板404.html/500.html
目前:
「百日草的博客 又一個百日博客 /錯誤500」
我的設置的.py配置是:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.comments',
'django.contrib.staticfiles',
'cms',
'mptt',
'south',
'cms.plugins.text',
'cms.plugins.picture',
'cms.plugins.link',
'cms.plugins.file',
'cms.plugins.snippet',
'cms.plugins.googlemap',
'django.contrib.sitemaps',
'sekizai',
'menus',
'filer',
'djangocms_utils',
'simple_translation',
'tagging',
'zinnia',
'cmsplugin_zinnia',
'django.contrib.sitemaps',
'cmsplugin_contact',
)
和url.py
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^i18n/', include('django.conf.urls.i18n')),
url(r'^', include('cms.urls')),
)
if settings.DEBUG:
urlpatterns = patterns('',
url(r'sitemap.xml/$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'cmspages': CMSSitemap}}),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'', include('django.contrib.staticfiles.urls')),
url(r'^weblog/', include('zinnia.urls')),
url(r'^comments/', include('django.contrib.comments.urls')),
) + urlpatterns
有什麼建議?
乾杯,
也許一些錯誤的URL命令:*嘗試*'URL模式+ =模式(...)''中如果settings.DEBUG:' – iMom0