when i remove django-debug-toolbar code in urls.py and in settings.py, it's work ok
In Django 2.2 I use such code:
if settings.DEBUG:
import debug_toolbar
urlpatterns += [path('__debug__/', include(debug_toolbar.urls))]
thank you @kwist-sgr
but it's not work,
i used django 2.2
python 3.7.3
I have the exact same issue. I'm not sure why it was closed.
Same issue
To offer some potential closure on this issue, the problem may be that an earlier pattern is claiming the __debug__/ path. For example, a catch-all pattern like this: url(r"", include(app_urls)),
In this case, the workaround is to put the debug toolbar path earlier in the list. For example:
if settings.DEBUG:
import debug_toolbar
urlpatterns.insert(0, path('__debug__/', include(debug_toolbar.urls)))
Most helpful comment
To offer some potential closure on this issue, the problem may be that an earlier pattern is claiming the __debug__/ path. For example, a catch-all pattern like this:
url(r"", include(app_urls)),
In this case, the workaround is to put the debug toolbar path earlier in the list. For example: