From c75311c469e2d25f8255f8092fde4cec59728d37 Mon Sep 17 00:00:00 2001 From: Alessandro Gervaso Date: Tue, 9 Jun 2020 18:37:13 +0200 Subject: [PATCH] Add STORAGE_BACKEND support in configuration.py This settings enable the support for STORAGE_BACKEND and STORAGE_CONFIG in the configuration.py file. --- configuration/configuration.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configuration/configuration.py b/configuration/configuration.py index 84bb6ae..0f38f4c 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -199,6 +199,17 @@ REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports') # this setting is derived from the installed location. SCRIPTS_ROOT = os.environ.get('SCRIPTS_ROOT', '/etc/netbox/scripts') +# The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with +# the django-storages package, which provides backends for several popular file storage services. If not configured, +# local filesystem storage will be used. +# The configuration parameters for the specified storage backend are defined under the STORAGE_CONFIG setting. +STORAGE_BACKEND = os.environ.get('STORAGE_BACKEND', None) + +# A dictionary of configuration parameters for the storage backend configured as STORAGE_BACKEND. The specific +# parameters to be used here are specific to each backend; see the django-storages documentation for more detail. +# If STORAGE_BACKEND is not defined, this setting will be ignored. +STORAGE_CONFIG = os.environ.get('STORAGE_CONFIG', None) + # Time zone (default: UTC) TIME_ZONE = os.environ.get('TIME_ZONE', 'UTC')