中缺少一个逗号, code>设置。 It looks like you are missing a comma in your INSTALLED_APPS setting. 而不是:INSTALLED_APPS = ( ... 'analysis' 'debug_toolbar', ...)应该是:INSTALLED_APPS = ( ... 'analysis', 'debug_toolbar', ...)当您忘记逗号时,Python将'analysis'和'debug_toolbar'插入字符串 analysisdebug_toolbar 。在Python中,最好在列表或元组的最后一个元素中加入一个逗号。它允许您添加新项目或重新排列顺序,而不会遇到这样的错误。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. 这篇关于Django调试工具栏导入errordebug_toolbar的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-18 12:15