fixed backend routing

This commit is contained in:
nvrl committed 2026-02-16 17:33:27 +01:00
1 parent f8ee3105f0
commit 478d3a7489
3 files changed
+11 -15

No files matched your search

+3 -4
View File
@@ -4,15 +4,14 @@ from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, Spec
from rest_framework.authtoken.views import obtain_auth_token
from django.conf import settings
from django.conf.urls.static import static
from django.views.static import serve
import re
import os
admin_path = os.environ.get('ADMIN_URL', 'admin/')
# Ensure the admin path is clean and always ends with a slash for Django
admin_url = os.environ.get('ADMIN_URL', 'admin').strip('/')
urlpatterns = [
path(admin_path, admin.site.urls),
path(f'{admin_url}/', admin.site.urls),
path('api/', include('api.urls')),
path('api/token/', obtain_auth_token, name='api_token'),
path('api-auth/', include('rest_framework.urls')),