annuaire/urls: Ajout de djdt en mode debug
This commit is contained in:
parent
f6e2f8404d
commit
b0226afa1e
1 changed files with 8 additions and 5 deletions
|
@ -14,10 +14,9 @@ Including another URLconf
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import admin
|
|
||||||
from django.urls import path, include
|
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from fiches.views import BirthdayView, HomeView
|
from django.contrib import admin
|
||||||
|
from django.urls import include, path
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", include("fiches.urls")),
|
path("", include("fiches.urls")),
|
||||||
|
@ -26,5 +25,9 @@ urlpatterns = [
|
||||||
path("i18n/", include("django.conf.urls.i18n")),
|
path("i18n/", include("django.conf.urls.i18n")),
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG and "debug_toolbar" in settings.INSTALLED_APPS:
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
from debug_toolbar import urls as debug_urls
|
||||||
|
|
||||||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + [
|
||||||
|
path("__debug__/", include(debug_urls))
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue