'Error: djdt is not defined how to solve this?

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')),
]


Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NixonSparrow