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