2025-11-18 18:30:21 +00:00
|
|
|
from django.contrib import admin
|
2025-11-19 13:30:51 +00:00
|
|
|
from django.urls import path, include, re_path
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
from django.conf.urls.static import static
|
|
|
|
|
|
|
|
|
|
from .views import serve_frontend
|
2025-11-18 18:30:21 +00:00
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
|
path('admin/', admin.site.urls),
|
2025-11-19 12:55:53 +00:00
|
|
|
path('api/', include('config.api')),
|
2025-11-19 13:30:51 +00:00
|
|
|
re_path(r'^(?!static/|media/)(?P<path>.*)$', serve_frontend, {'document_root': settings.BUILD_DIR}),
|
|
|
|
|
*static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
|
|
|
|
|
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
|
2025-11-18 18:30:21 +00:00
|
|
|
]
|