Revert breaking changes.
Revert "Add missing file for collect static"
This reverts commit b823909386.
This commit is contained in:
@@ -157,19 +157,13 @@ WHITENOISE_SKIP_COMPRESS_EXTENSIONS = ['css', 'js']
|
|||||||
# Return 404 instead of 500 for missing files
|
# Return 404 instead of 500 for missing files
|
||||||
WHITENOISE_MISSING_FILE_ERRNO = None
|
WHITENOISE_MISSING_FILE_ERRNO = None
|
||||||
|
|
||||||
# Für nutzergenerierte Dateien (Medien) - definieren vor WhiteNoise-Konfiguration
|
|
||||||
import os
|
|
||||||
MEDIA_URL = '/media/' # URL, um auf Medien-Dateien zuzugreifen
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # Speicherort für hochgeladene Dateien
|
|
||||||
|
|
||||||
# WhiteNoise media configuration - wichtig für Produktionsmodus
|
|
||||||
WHITENOISE_ROOT = MEDIA_ROOT
|
|
||||||
WHITENOISE_USE_FINDERS = False
|
|
||||||
WHITENOISE_AUTOREFRESH = True
|
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
LOGIN_URL = '/account/login/'
|
LOGIN_URL = '/account/login/'
|
||||||
|
import os
|
||||||
|
|
||||||
|
MEDIA_URL = '/media/' # URL, um auf Medien-Dateien zuzugreifen
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # Speicherort für hochgeladene Dateien
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ urlpatterns = [
|
|||||||
path('components/', include('components.urls'))
|
path('components/', include('components.urls'))
|
||||||
]
|
]
|
||||||
|
|
||||||
# Stelle Mediendateien auch im Produktionsmodus bereit
|
if settings.DEBUG:
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user