Skip to content

Commit

Permalink
Update gcloud.rst
Browse files Browse the repository at this point in the history
Fix settings for Django 4.2
  • Loading branch information
philgyford committed Apr 5, 2023
1 parent 90e2e78 commit 12c43fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/backends/gcloud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down

0 comments on commit 12c43fc

Please sign in to comment.