Add django-debug-toolbar
This commit is contained in:
parent
4e67e7299d
commit
d350b7bcd8
3 changed files with 20 additions and 6 deletions
|
|
@ -15,12 +15,15 @@ urlpatterns: [URLPattern | URLResolver] = [ # type: ignore[assignment]
|
|||
path(route="", view=include("twitch.urls", namespace="twitch")),
|
||||
]
|
||||
|
||||
if getattr(settings, "ENABLE_SILK", False):
|
||||
urlpatterns += [path("silk/", include("silk.urls", namespace="silk"))]
|
||||
|
||||
# Serve media in development
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(
|
||||
settings.MEDIA_URL,
|
||||
document_root=settings.MEDIA_ROOT,
|
||||
)
|
||||
|
||||
if not settings.TESTING:
|
||||
from debug_toolbar.toolbar import debug_toolbar_urls
|
||||
|
||||
urlpatterns += [path("silk/", include("silk.urls", namespace="silk"))]
|
||||
urlpatterns = [*urlpatterns, *debug_toolbar_urls()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue