Skip to content

Commit

Permalink
[CHA] different way to expose static files
Browse files Browse the repository at this point in the history
  • Loading branch information
dameyerdave committed Jan 4, 2024
1 parent c8643a3 commit 4cace0e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/app/ena_upload_ms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
from django.urls import path, include
from django.conf import settings
from drf_auto_endpoint.router import router
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from rest_framework.authtoken import views as authtoken_views
from django.conf.urls.static import static
from django.contrib.staticfiles.views import serve
from drf_spectacular.views import (
SpectacularAPIView,
SpectacularRedocView,
Expand Down Expand Up @@ -47,4 +50,7 @@
]

if not settings.DEBUG:
urlpatterns += staticfiles_urlpatterns()
# urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(
settings.STATIC_URL, view=serve, document_root=settings.STATIC_ROOT
)

0 comments on commit 4cace0e

Please sign in to comment.