#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
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

 * cc: Carlton Gibson (added)


Comment:

 Replying to [comment:4 Petr DlouhĂ˝]:
 > @Mariusz Felisiak
 > Now I realized, that there is another problem with this approach.
 > If I set
 `STORAGES["staticfiles"]["BACKEND"]="storages.backends.s3boto3.S3Boto3Storage"`
 with some OPTIONS and I set the `AWS_*` variables at the same time those
 variables will be taken preferentially.
 > That means, that I can't set `AWS_*` variables if I use the new
 `STORAGES`, so this approach will not help at all in my case.

 Yes, but this is something that you should report to the 3rd-party
 storage, it's not an issue in Django itself. I'd not expect that all 3rd-
 party storage backends will support the new setting immediately.
 Therefore, it's a pending deprecation, so there is plenty of time to
 switch to the new `STORAGES`. I don't see anything unusual in using
 `STORAGES` for defining the engine and project-settings for defining
 options.

 > I think mixing the old and new settings will lead to many unexpected
 problems.
 > I would be OK if I would have to wait until the `get_storage_class`
 usage is removed from all applications that I use.
 > So overall I still think the best approach to this issue would be to
 solve this issue with:
 > {{{
 > setattr(self, 'DEFAULT_FILE_STORAGE', None)
 > setattr(self, 'STATICFILES_STORAGE', None)
 > }}}

 I don't agree, this will cause extra work for all 3rd-party packages that
 use the old settings, and may effectively force them to use `STORAGES`
 immediately which is against our deprecation policy.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34773#comment:5>
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/0107018a03dec6ae-f5ed0d9f-aff0-41b6-8e60-b1c082637601-000000%40eu-central-1.amazonses.com.

Reply via email to