diff --git a/annuaire/urls.py b/annuaire/urls.py index a26909d..831235e 100644 --- a/annuaire/urls.py +++ b/annuaire/urls.py @@ -21,13 +21,16 @@ from fiches.views import BirthdayView, HomeView import django_cas_ng.views as cas_views urlpatterns = [ - path('admin/', admin.site.urls), - path('fiche/', include('fiches.urls')), - path('', HomeView.as_view(), name='home'), - path('birthday', BirthdayView.as_view(), name='birthday'), - path('accounts/login/', cas_views.LoginView.as_view(), name='cas_ng_login'), - path('logout', cas_views.LogoutView.as_view(), name='cas_ng_logout'), + path("admin/", admin.site.urls), + path("fiche/", include("fiches.urls")), + path("", HomeView.as_view(), name="home"), + path("birthday", BirthdayView.as_view(), name="birthday"), + path("accounts/login/", cas_views.LoginView.as_view(), name="cas_ng_login"), + path("logout", cas_views.LogoutView.as_view(), name="cas_ng_logout"), ] -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))]