chore(app/urls): Cleaner file

This commit is contained in:
Tom Hubrecht 2024-10-06 16:52:15 +02:00
parent 9c4413faa1
commit 61bb59d244
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -14,11 +14,11 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.generic import TemplateView
urlpatterns = [
path("", include("dgsi.urls")),
@ -29,10 +29,8 @@ urlpatterns = [
]
if settings.DEBUG:
urlpatterns += (
[
path("__debug__/", include("debug_toolbar.urls")),
]
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
)
urlpatterns += [
path("__debug__/", include("debug_toolbar.urls")),
*static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
]