Django debug toolbar import error of analysisdebug_toolbar

流过昼夜 提交于 2019-11-28 13:08:41

It looks like you are missing a comma in your INSTALLED_APPS setting.

Instead of:

INSTALLED_APPS = (
    ...
    'analysis'
    'debug_toolbar',
    ...
)

It should be:

INSTALLED_APPS = (
    ... 
    'analysis',
    'debug_toolbar',
    ...
)

When you forget the comma, Python concatonates 'analysis' and 'debug_toolbar' into the string analysisdebug_toolbar. In Python, it's a good idea to include a trailing comma in the last element in your list or tuple. It allows you to add new items or rearrange the order without hitting bugs like this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!