Ajoute la debug_toolbar

This commit is contained in:
Ludovic Stephan 2020-11-16 18:41:06 +01:00 committed by Tom Hubrecht
parent 606047fe0d
commit 379ef8d1a6

View file

@ -26,5 +26,8 @@ urlpatterns = [
path("i18n/", include("django.conf.urls.i18n")),
]
if settings.DEBUG:
if settings.DEBUG and "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]