From b21940bc0ca50663e51702a92065ddd02f8049ad Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Thu, 6 Oct 2022 18:12:25 -0400 Subject: [PATCH] Serve static files during development This won't affect production: it will only serve static files if --- steering/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/steering/urls.py b/steering/urls.py index b7cab767..92077678 100644 --- a/steering/urls.py +++ b/steering/urls.py @@ -21,6 +21,8 @@ from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView from rest_framework_nested import routers +from django.conf import settings +from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from program.views import ( @@ -106,4 +108,4 @@ urlpatterns = [ name="swagger-ui", ), path("admin/", admin.site.urls), -] +] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) -- GitLab