version 22

This commit is contained in:
Flatlogic Bot 2026-03-13 04:13:41 +00:00
parent 5082c8c2c8
commit e1b2abf2d5
2 changed files with 5 additions and 5 deletions

View File

@ -15,15 +15,15 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path
from django.urls import include, path, re_path
from django.conf import settings
from django.conf.urls.static import static
from django.views.static import serve
urlpatterns = [
path("admin/", admin.site.urls),
# Serve assets and static files explicitly before the catch-all
re_path(r'^assets/(?P<path>.*)$', serve, {'document_root': settings.BASE_DIR.parent / "frontend" / "dist" / "assets"}),
path(settings.STATIC_URL.lstrip('/'), serve, {'document_root': settings.STATIC_ROOT}),
path("", include("core.urls")),
]
if settings.DEBUG:
urlpatterns += static("/assets/", document_root=settings.BASE_DIR.parent / "frontend" / "dist" / "assets")
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)