Skip to content

Commit

Permalink
Migrate DEFAULT_FILE_STORAGE to STORAGES
Browse files Browse the repository at this point in the history
  • Loading branch information
bctiemann authored and jeremystretch committed Jan 17, 2025
1 parent 07ad4c1 commit 50b7f46
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion netbox/netbox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,18 @@
# 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.'):
Expand Down

0 comments on commit 50b7f46

Please sign in to comment.