django-commons / django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.
https://django-debug-toolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
8.08k stars 1.05k forks source link

Installation docs don't include how to edit the '__debug__' prefix #2010

Closed tankorsmash closed 2 weeks ago

tankorsmash commented 2 weeks ago

Thanks for making a wonderful tool!

https://django-debug-toolbar.readthedocs.io/en/latest/installation.html

urlpatterns = [
    # ... the rest of your URLconf goes here ...
] + debug_toolbar_urls()

By default this uses the "__debug__" prefix for the paths, but you can use any prefix that doesn’t clash with your application’s URLs.

In older versions of the docs, eg v3.8, the example code included the url path literally:

urlpatterns = [
    # ...
    path('__debug__/', include('debug_toolbar.urls')),
]

Not sure what the correct way of doing changing the prefix is now, and the current text is a little confusing.

tim-schilling commented 2 weeks ago

I don't disagree the current text is a bit confusing. We should probably remove it, but I'm not in favor of adjusting the install page to cover that case.

Specifically, you can look at the debug_toolbar_urls function definition to understand what you can replace it with.

tankorsmash commented 2 weeks ago

Thanks, I'll close the issue