[Django] #31642: Some static assets in the Admin site fail to fetch (using custom storage)

9 views
Skip to first unread message

Django

unread,
May 30, 2020, 12:06:18 PM5/30/20
to django-...@googlegroups.com
#31642: Some static assets in the Admin site fail to fetch (using custom storage)
-------------------------------------+-------------------------------------
Reporter: probabble | Owner: nobody
Type: Bug | Status: new
Component: | Version: 3.0
contrib.admin | Keywords: staticfiles, admin,
Severity: Normal | storages
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
My integration with django_storages fails to load certain assets in the
default Django admin, because they don't get the access GET params
appended to them.

There are workarounds related to making the static files bucket in S3
"public" but it seems like that doesn't necessarily meet all use cases.

see related issue in Django Storages project: https://github.com/jschneier
/django-storages/issues/734

Examples of urls in the admin base CSS that fail in private buckets:
https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/base.css#L5
https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/base.css#L641

--
Ticket URL: <https://code.djangoproject.com/ticket/31642>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 30, 2020, 1:41:07 PM5/30/20
to django-...@googlegroups.com
#31642: Some static assets in the Admin site fail to fetch (using custom storage)
-------------------------------------+-------------------------------------
Reporter: Evan Babb | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution:
Keywords: staticfiles, admin, | Triage Stage:
storages | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I'm not sure what Django could do besides rendering the CSS files using
the template system to allow using the `{% static %}` tag for those
references? I tend to think that it's not worth imposing that performance
penalty on all Django sites.

--
Ticket URL: <https://code.djangoproject.com/ticket/31642#comment:1>

Django

unread,
Jun 1, 2020, 3:48:57 AM6/1/20
to django-...@googlegroups.com
#31642: Some static assets in the Admin site fail to fetch (using custom storage)
-------------------------------------+-------------------------------------
Reporter: Evan Babb | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution: wontfix

Keywords: staticfiles, admin, | Triage Stage:
storages | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* type: Bug => Cleanup/optimization
* resolution: => wontfix


Comment:

I agree with Tim. You should be able to rewrite the CSS stylesheet if you
really need to serve them from a private bucket.

--
Ticket URL: <https://code.djangoproject.com/ticket/31642#comment:2>

Reply all
Reply to author
Forward
0 new messages