当我尝试启用django-debug-tool-bar时,我收到“500 Internal Server Error”。 它已经安装好了,我在settings.py中粘贴了它:
if DEBUG:
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel',
'debug_toolbar.panels.timer.TimerDebugPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel',
#'debug_toolbar.panels.profiling.ProfilingDebugPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
'debug_toolbar.panels.sql.SQLDebugPanel',
'debug_toolbar.panels.template.TemplateDebugPanel',
'debug_toolbar.panels.cache.CacheDebugPanel',
'debug_toolbar.panels.signals.SignalDebugPanel',
'debug_toolbar.panels.logger.LoggingPanel',
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}
我的apache不想正确加载中间件: apache错误日志:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
django.core.exceptions.ImproperlyConfigured: Error importing middleware debug_toolbar.middleware: "No module named 'thread'"
我尝试在列表顶部添加debug-toolbar-middleware但没有任何变化。
我正在使用django 1.5和python 3.3,我已经使用python3.3 setup.py install
安装了调试工具栏
我没看到什么?