django-debug-toolbar安装过程中的error

django-debug-toolbar安装过程中的error

1、djdt’ is not a registered namespace

解决:在url中添加如下代码
if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        url(r'__debug__/',include(debug_toolbar.urls)),
    ] + urlpatterns

2、name 'include' is not defined

解决:在urls中添加如下代码
from django.conf.urls import include

3、name 'settings' is not defined

解决:在urls中添加如下代码
from django.conf import settings
posted @ 2020-03-28 20:57  import*  阅读(316)  评论(0编辑  收藏  举报