diff --git a/src/app/urls.py b/src/app/urls.py index c33a36f..8cc4af3 100644 --- a/src/app/urls.py +++ b/src/app/urls.py @@ -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), + ]