Skip to content

Commit 25bd790

Browse files
Merge pull request #2282 from IFRCGo/feature/proper-azure-handling
Azure handling the proper way
2 parents 682a280 + f33399c commit 25bd790

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

main/settings.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -421,17 +421,14 @@
421421
"CDN_HOST": None,
422422
"USE_SSL": False,
423423
}
424-
if AZURE_STORAGE_ACCOUNT:
425-
DEFAULT_FILE_STORAGE = "api.storage.AzureStorage"
424+
# instead of: if AZURE_STORAGE_ACCOUNT: DEFAULT_FILE_STORAGE = "api.storage.AzureStorage"
425+
# > https://django-storages.readthedocs.io/en/latest/backends/azure.html
426426

427-
"""
428-
# FIXME: TODO: Use this instead. https://django-storages.readthedocs.io/en/latest/backends/azure.html
429-
AZURE_ACCOUNT_NAME = env('AZURE_STORAGE_ACCOUNT')
430-
AZURE_ACCOUNT_KEY = env('AZURE_STORAGE_KEY')
431-
AZURE_CONTAINER = 'api'
427+
AZURE_ACCOUNT_NAME = env("AZURE_STORAGE_ACCOUNT")
428+
AZURE_ACCOUNT_KEY = env("AZURE_STORAGE_KEY")
429+
AZURE_CONTAINER = "api"
432430
if AZURE_STORAGE_ACCOUNT:
433-
DEFAULT_FILE_STORAGE = 'storages.backends.azure_storage.AzureStorage'
434-
"""
431+
DEFAULT_FILE_STORAGE = "storages.backends.azure_storage.AzureStorage"
435432

436433
# Email config
437434
EMAIL_API_ENDPOINT = env("EMAIL_API_ENDPOINT")

0 commit comments

Comments
 (0)