From 50b7f46fc0971ebe6d6ea6c8a6eaf6d4de3c035d Mon Sep 17 00:00:00 2001 From: Brian Tiemann Date: Wed, 15 Jan 2025 10:18:30 -0500 Subject: [PATCH] Migrate DEFAULT_FILE_STORAGE to STORAGES --- netbox/netbox/settings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 581cd9ef4..84b86ba13 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -222,8 +222,18 @@ DATABASES = { # Storage backend # +# Default STORAGES for Django +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", + }, +} + if STORAGE_BACKEND is not None: - DEFAULT_FILE_STORAGE = STORAGE_BACKEND + STORAGES['default']['BACKEND'] = STORAGE_BACKEND # django-storages if STORAGE_BACKEND.startswith('storages.'):