mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-10 01:56:40 +00:00
@@ -265,13 +265,9 @@ DBBACKUP_EMAIL_SUBJECT_PREFIX = InvenTree.backup.backup_email_prefix()
|
|||||||
DBBACKUP_CONNECTORS = {'default': InvenTree.backup.get_backup_connector_options()}
|
DBBACKUP_CONNECTORS = {'default': InvenTree.backup.get_backup_connector_options()}
|
||||||
|
|
||||||
# Data storage options
|
# Data storage options
|
||||||
STORAGES = {
|
DBBACKUP_STORAGE_CONFIG = {
|
||||||
'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'},
|
|
||||||
'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'},
|
|
||||||
'dbbackup': {
|
|
||||||
'BACKEND': InvenTree.backup.get_backup_storage_backend(),
|
'BACKEND': InvenTree.backup.get_backup_storage_backend(),
|
||||||
'OPTIONS': InvenTree.backup.get_backup_storage_options(),
|
'OPTIONS': InvenTree.backup.get_backup_storage_options(),
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enable django admin interface?
|
# Enable django admin interface?
|
||||||
@@ -1567,6 +1563,8 @@ if SITE_URL and not TESTING: # pragma: no cover
|
|||||||
|
|
||||||
# Storage backends
|
# Storage backends
|
||||||
STORAGE_TARGET, STORAGES, _media = storages.init_storages()
|
STORAGE_TARGET, STORAGES, _media = storages.init_storages()
|
||||||
|
if 'dbbackup' not in STORAGES:
|
||||||
|
STORAGES['dbbackup'] = DBBACKUP_STORAGE_CONFIG
|
||||||
if _media:
|
if _media:
|
||||||
MEDIA_URL = _media
|
MEDIA_URL = _media
|
||||||
PRESIGNED_URL_EXPIRATION = 600
|
PRESIGNED_URL_EXPIRATION = 600
|
||||||
|
|||||||
Reference in New Issue
Block a user