Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add google cloud missing config (#6639)
Marcelodb212f09fbbb
diff --git a/pyproject.toml b/pyproject.tomlindex b55b325e2b..dfaf9e8ec8 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -28,7 +28,7 @@ django-phonenumber-field = ">=4,<6"django-prices = "^2.1"django-prices-openexchangerates = "^1.0.1"django-prices-vatlayer = "^1.1.0"-django-storages = { version = "^1.7.1", extras = [ "google" ] }+django-storages = { version = "^1.11", extras = [ "google" ] }django-templated-email = "^2.3.0"django-versatileimagefield = "^2.0"draftjs-sanitizer = "^1.0.0"diff --git a/requirements.txt b/requirements.txtindex 119bce49db..61fef251a4 100644--- a/requirements.txt+++ b/requirements.txt@@ -37,7 +37,7 @@ django-prices-vatlayer==1.1.0django-prices==2.2.0django-redis==4.12.1; python_version >= "3.5"django-render-block==0.8.1; python_version >= "3.5"-django-storages==1.10.1; python_version >= "3.5"+django-storages==1.11; python_version >= "3.5"django-templated-email==2.3.0django-versatileimagefield==2.0django==3.1.4; python_version >= "3.6"diff --git a/requirements_dev.txt b/requirements_dev.txtindex 61454bae42..a2ddf547c8 100644--- a/requirements_dev.txt+++ b/requirements_dev.txt@@ -52,7 +52,7 @@ django-prices-vatlayer==1.1.0django-prices==2.2.0django-redis==4.12.1; python_version >= "3.5"django-render-block==0.8.1; python_version >= "3.5"-django-storages==1.10.1; python_version >= "3.5"+django-storages==1.11; python_version >= "3.5"django-stubs==1.2.0; python_version >= "3.6"django-templated-email==2.3.0django-versatileimagefield==2.0diff --git a/saleor/core/storages.py b/saleor/core/storages.pyindex b80a157c40..37e9713efa 100644--- a/saleor/core/storages.py+++ b/saleor/core/storages.py@@ -13,4 +13,5 @@ class S3MediaStorage(S3Boto3Storage):class GCSMediaStorage(GoogleCloudStorage):def __init__(self, *args, **kwargs):self.bucket_name = settings.GS_MEDIA_BUCKET_NAME+ self.custom_endpoint = settings.GS_MEDIA_CUSTOM_ENDPOINTsuper().__init__(*args, **kwargs)diff --git a/saleor/settings.py b/saleor/settings.pyindex a1deac44a5..858394d5b1 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -415,6 +415,10 @@ GS_PROJECT_ID = os.environ.get("GS_PROJECT_ID")GS_STORAGE_BUCKET_NAME = os.environ.get("GS_STORAGE_BUCKET_NAME")GS_MEDIA_BUCKET_NAME = os.environ.get("GS_MEDIA_BUCKET_NAME")GS_AUTO_CREATE_BUCKET = get_bool_from_env("GS_AUTO_CREATE_BUCKET", False)+GS_QUERYSTRING_AUTH = get_bool_from_env("GS_QUERYSTRING_AUTH", False)+GS_DEFAULT_ACL = os.environ.get("GS_DEFAULT_ACL", None)+GS_MEDIA_CUSTOM_ENDPOINT = os.environ.get("GS_MEDIA_CUSTOM_ENDPOINT", None)+GS_EXPIRATION = os.environ.get("GS_EXPIRATION", None)# If GOOGLE_APPLICATION_CREDENTIALS is set there is no need to load OAuth token# See https://django-storages.readthedocs.io/en/latest/backends/gcloud.html