Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix django templates error when getting static files from Google Cloud Storage bucket #24

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

bartacc
Copy link
Collaborator

@bartacc bartacc commented Nov 24, 2024

django-storages by default always generates a signed url for downloading data from cloud storage bucket. That's why it threw an error when trying to get static files for /admin route. The solution is to tell django-storages that default ACL is "publicRead" (since the static files bucket is public), because we don't need to use a signed url. File upload is not affected by this change (upload worked correctly before and still works).

For more context you can read this issue on django-storages repo and the part about GS_DEFAULT_ACL variable from the django-storages docs.

@bartacc bartacc merged commit 58a76e1 into develop Nov 24, 2024
1 check passed
@bartacc bartacc deleted the bartacc/fix_staticfiles_error_gcp branch November 24, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant