From df88f307f4d866cb277ec836ec627c32b1f0a7fb Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Wed, 18 Feb 2026 14:32:29 +0100 Subject: [PATCH] fixed 500 error when reloading admin panel --- backend/holy_backend/settings.py | 3 +-- backend/holy_backend/urls.py | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/backend/holy_backend/settings.py b/backend/holy_backend/settings.py index ff73469..f5168d5 100644 --- a/backend/holy_backend/settings.py +++ b/backend/holy_backend/settings.py @@ -69,7 +69,7 @@ ROOT_URLCONF = 'holy_backend.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR, '..', 'frontend', 'dist')], + 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -142,7 +142,6 @@ USE_TZ = True STATIC_URL = 'static/' STATIC_ROOT = BASE_DIR / 'staticfiles' -STATICFILES_DIRS = [os.path.join(BASE_DIR, '..', 'frontend', 'dist')] STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage' WHITENOISE_INDEX_PAGE = True diff --git a/backend/holy_backend/urls.py b/backend/holy_backend/urls.py index acc148f..aec8d25 100644 --- a/backend/holy_backend/urls.py +++ b/backend/holy_backend/urls.py @@ -11,9 +11,6 @@ import os # Clean the admin path admin_url = os.environ.get('ADMIN_URL', 'admin').strip('/') -# Catch-all view for React -index_view = TemplateView.as_view(template_name="index.html") - urlpatterns = [ # Robots.txt path('robots.txt', TemplateView.as_view(template_name="robots.txt", content_type="text/plain")), @@ -27,8 +24,4 @@ urlpatterns = [ path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'), path('media/', serve, {'document_root': settings.MEDIA_ROOT}), - - # Catch-all for React Frontend - path('', index_view, name='index'), - path('', index_view), ]