django调试工具栏抛出错误配置的异常

时间:2016-04-11 08:53:47

标签: python django django-debug-toolbar

我安装了django 1.9和django-debug-toolbar == 1.3.0。这是我的settings.py内容

# debug_toolbar settings
if DEBUG:
    INTERNAL_IPS = ('127.0.0.1',)
    MIDDLEWARE_CLASSES += (
        'debug_toolbar.middleware.DebugToolbarMiddleware',
    )

    INSTALLED_APPS += (
        'debug_toolbar',
    )

    DEBUG_TOOLBAR_PANELS = [
        'debug_toolbar.panels.versions.VersionsPanel',
        'debug_toolbar.panels.timer.TimerPanel',
        'debug_toolbar.panels.settings.SettingsPanel',
        'debug_toolbar.panels.headers.HeadersPanel',
        'debug_toolbar.panels.request.RequestPanel',
        'debug_toolbar.panels.sql.SQLPanel',
        'debug_toolbar.panels.staticfiles.StaticFilesPanel',
        'debug_toolbar.panels.templates.TemplatesPanel',
        'debug_toolbar.panels.cache.CachePanel',
        'debug_toolbar.panels.signals.SignalsPanel',
        'debug_toolbar.panels.logging.LoggingPanel',
        'debug_toolbar.panels.redirects.RedirectsPanel',
    ]

    DEBUG_TOOLBAR_CONFIG = {
        'INTERCEPT_REDIRECTS': False,
    }

我已经验证DEBUG设置为True。运行服务器时,出现以下错误 -

django.core.exceptions.ImproperlyConfigured: Error importing debug panel debug_toolbar.panels.versions: "cannot import name linebreak_iter"

可以在此处找到整个堆栈跟踪 - https://gist.github.com/anonymous/7a48e7c24d530118e5dfc0a75b982be2

出了什么问题? TIA。

0 个答案:

没有答案