mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-13 11:26:42 +00:00
(cherry picked from commit 39f0054cd5)
Co-authored-by: Lê Hoàng Nam <lehoangnam040@gmail.com>
This commit is contained in:
committed by
GitHub
parent
77bc7fd4af
commit
fd4375357f
@@ -265,13 +265,9 @@ DBBACKUP_EMAIL_SUBJECT_PREFIX = InvenTree.backup.backup_email_prefix()
|
||||
DBBACKUP_CONNECTORS = {'default': InvenTree.backup.get_backup_connector_options()}
|
||||
|
||||
# Data storage options
|
||||
STORAGES = {
|
||||
'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'},
|
||||
'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'},
|
||||
'dbbackup': {
|
||||
DBBACKUP_STORAGE_CONFIG = {
|
||||
'BACKEND': InvenTree.backup.get_backup_storage_backend(),
|
||||
'OPTIONS': InvenTree.backup.get_backup_storage_options(),
|
||||
},
|
||||
}
|
||||
|
||||
# Enable django admin interface?
|
||||
@@ -1567,6 +1563,8 @@ if SITE_URL and not TESTING: # pragma: no cover
|
||||
|
||||
# Storage backends
|
||||
STORAGE_TARGET, STORAGES, _media = storages.init_storages()
|
||||
if 'dbbackup' not in STORAGES:
|
||||
STORAGES['dbbackup'] = DBBACKUP_STORAGE_CONFIG
|
||||
if _media:
|
||||
MEDIA_URL = _media
|
||||
PRESIGNED_URL_EXPIRATION = 600
|
||||
|
||||
Reference in New Issue
Block a user