We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52cc46b commit 1bf7f2fCopy full SHA for 1bf7f2f
config/settings/files_and_storages.py
@@ -14,12 +14,12 @@
14
env("FILE_UPLOAD_STORAGE", default="local")
15
)
16
17
-if FILE_UPLOAD_STORAGE == "local":
+if FILE_UPLOAD_STORAGE == FileUploadStorage.LOCAL:
18
MEDIA_ROOT_NAME = "media"
19
MEDIA_ROOT = os.path.join(BASE_DIR, MEDIA_ROOT_NAME)
20
MEDIA_URL = f"/{MEDIA_ROOT_NAME}/"
21
22
-if FILE_UPLOAD_STORAGE == "s3":
+if FILE_UPLOAD_STORAGE == FileUploadStorage.S3:
23
# Using django-storages
24
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html
25
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
0 commit comments