Opened 2 years ago

Last modified 5 months ago

#21221 assigned Bug

Widgets and Admin's Media should use the configured staticfiles storage to create the right path to a file

Reported by: Guilherme Gondim <semente@…> Owned by: antonpp
Component: contrib.staticfiles Version: 1.5
Severity: Normal Keywords: staticfiles, admin, CachedFilesMixin, media, widgets
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Taking for example the following widget snippet:

class Editor(widgets.Textarea):   

    class Media:
        js = ('editor/editor.js',)
        css = {'all': ('editor/editor.css',)}

When using CachedFilesMixin, from the staticfiles contrib app, the right path to the media file should be the one with the hash suffix but what we got is just a concatenation of STATIC_URL and the relative path of the media file.

Change History (4)

comment:1 Changed 23 months ago by timo

  • Component changed from contrib.admin to contrib.staticfiles
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

I haven't tested, but it seems like this should indeed work like you described.

comment:2 Changed 6 months ago by eranrund

Hi!
Any plan to do anything about this?
This is unfortunately still broken :(

comment:3 Changed 6 months ago by timgraham

It doesn't appear that anyone has offered a patch.

comment:4 Changed 5 months ago by antonpp

  • Owner changed from nobody to antonpp
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.
Back to Top