0

I just upgraded django 2.1 to django 3.0.14: then I got this error ModuleNotFoundError: No module named 'django.utils.lru_cache' in django-debug-toolbar, so I upgraded my django-debug-toolbar 1.9.1 to django-debug-toolbar 2.0 and run python manage.py collectstatic and clear cache from browser after that above error is resolved but debug-toolbar is not showing and in console got the error:

toolbar.js:306 Uncaught ReferenceError: djdt is not defined

how to resolve this error? I already have::

INSTALLED_APPS = [
    # ...
    "debug_toolbar",
    # ...
]

STATIC_URL = "static/"

from django.urls import include, path
INTERNAL_IPS = [
    # ...
    "127.0.0.1",
    # ...
]
urlpatterns = [
    # ...
    path('__debug__/', include('debug_toolbar.urls')),
]
girish kumar
  • 11
  • 1
  • 3

2 Answers2

0

It's a browser caching problem. Delete cookies etc. and it'll help.

NixonSparrow
  • 6,130
  • 1
  • 6
  • 18
0

I faced the same error. It was a silly mistake from my side. I added the django urls in the wrong urls.py file. I should have added them in the core/urls.py rather than adding in the apps' urls.py.

urlpatterns = [
    # ...
    path('__debug__/', include('debug_toolbar.urls')),
]
Chandragupta Borkotoky
  • 1,596
  • 1
  • 11
  • 16