From 12c43fcea9a972662782638cd8f1031108914930 Mon Sep 17 00:00:00 2001 From: Phil Gyford Date: Wed, 5 Apr 2023 15:31:33 +0100 Subject: [PATCH] Update gcloud.rst Fix settings for Django 4.2 --- docs/backends/gcloud.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/backends/gcloud.rst b/docs/backends/gcloud.rst index 1f322083a..e62b31848 100644 --- a/docs/backends/gcloud.rst +++ b/docs/backends/gcloud.rst @@ -46,7 +46,7 @@ Set the default storage and bucket name in your settings.py file DEFAULT_FILE_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage' # django >= 4.2 - STORAGES = {"default": "storages.backends.gcloud.GoogleCloudStorage"} + STORAGES = {"default": {"BACKEND": "storages.backends.gcloud.GoogleCloudStorage"}} GS_BUCKET_NAME = 'YOUR_BUCKET_NAME_GOES_HERE' @@ -57,7 +57,7 @@ To allow ``django-admin`` collectstatic to automatically put your static files i STATICFILES_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage' # django >= 4.2 - STORAGES = {"staticfiles": "storages.backends.gcloud.GoogleCloudStorage"} + STORAGES = {"staticfiles": {"BACKEND": "storages.backends.gcloud.GoogleCloudStorage"}} Once you're done, default_storage will be Google Cloud Storage