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

CollectStatic when using Django Storages and a private bucket #1052

Closed
shicholas opened this issue Mar 21, 2024 · 2 comments
Closed

CollectStatic when using Django Storages and a private bucket #1052

shicholas opened this issue Mar 21, 2024 · 2 comments

Comments

@shicholas
Copy link

Hello,

We have a private S3 bucket that we use with django-storages. Uploading Grappelli assets is fine with the collectstatic command, but reading requires query params containing a short-lived access key to get all assets. For instance, https://YOUR_S3_BUCKET.s3.amazonaws.com/grappelli/images/backgrounds/changelist-results.png, which is referenced by Grappelli, should be https://YOUR_S3_BUCKET.s3.amazonaws.com/grappelli/images/backgrounds/changelist-results.png?X-AMZ-Secret... which contains query params with the token. Django Storages does this for you automatically if you use something like a FileField, and AFAICT the only things that don't are the assets in Grappelli.

Thanks for reading this, I enjoy using the library!

@sehmaschine
Copy link
Owner

@shicholas Sorry, but I don't fully understand why this is an issue with Grappelli. What exactly should we do to solve this? To me, this looks more like an issue with django-storages ...

@shicholas
Copy link
Author

okay, I'm new to Django so wasn't sure if you can use the static template tag in CSS. I can close this, thanks for building it!

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

No branches or pull requests

2 participants