#34773: settings.STATICFILES_STORAGE does not return correct value when STORAGES
are defined
--------------------------------------+------------------------------------
Reporter: Petr DlouhĂ˝ | Owner: nobody
Type: Bug | Status: new
Component: contrib.staticfiles | Version: 4.2
Severity: Release blocker | Resolution:
Keywords: storages staticfiles | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Petr DlouhĂ˝):
@Mariusz Felisiak
This code started working only when I re-introduced additional settings
for the `DEFAULT_STORAGE` (which is
`"storages.backends.s3boto3.S3Boto3Storage"` in my case):
{{{
AWS_ACCESS_KEY_ID = AWS_DEFAULT.get("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = AWS_DEFAULT.get("AWS_SECRET_ACCESS_KEY")
AWS_S3_ENDPOINT_URL = AWS_DEFAULT.get("AWS_S3_ENDPOINT_URL")
AWS_S3_HOST = AWS_DEFAULT.get("AWS_S3_HOST", "s3.amazonaws.com")
AWS_S3_CUSTOM_DOMAIN = AWS_DEFAULT.get("AWS_S3_CUSTOM_DOMAIN", None)
AWS_STORAGE_BUCKET_NAME = AWS_DEFAULT.get("AWS_STORAGE_BUCKET_NAME",
"bucket")
}}}
I already deleted those values from my settings (used them only for
`STORAGES`), but only now I realized, that I need them for applications
like `django-avatar` that didn't transition to the new `STORAGES` yet and
were appearing to work but in fact were working with different storage
than I intended.
I am not sure, if there are not any other consequences of this code, but
this seems to enable much smoother transition.
--
Ticket URL: <https://code.djangoproject.com/ticket/34773#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070189f418378b-4707027b-1386-4481-8384-3db50b2342f2-000000%40eu-central-1.amazonses.com.