开发 · July 26, 2022 0

Django Debug Toolbar BaseConnectionHandler.all() error

Table of Content

出现以下问题

Django Debug Toolbar BaseConnectionHandler.all() error
解决方案比较简单,是版本兼容导致的。
只需要固定下版本即可
pip install django-debug-toolbar == 3.4.0

另外出现以下错误

django.core.exceptions.ImproperlyConfigured: WSGI application ‘application’ could not be loaded

也是由于版本问题导致
先移除debug_toolbar,在处理即可

INSTALLED_APPS = [
    ...
    'debug_toolbar',
    ...
]

MIDDLEWARE = [
    ...
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    ...
]
%d bloggers like this: