Opened 9 years ago

Closed 9 years ago

#24655 closed Bug (fixed)

Admin RelatedFieldWidgetWrapper does not build static url correctly

Reported by: Eric Whitmire Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


RelatedFieldWidgetWrapper requires 'admin/js/related-widget-wrapper.js' but doesn't pass it through the static url builder. As it is, django/forms/ always prepends STATIC_URL. However, this doesn't work when using a Storage class like S3BotoStorage that doesn't use STATIC_URL and results in a 404 error.

It looks like the fix is simply to add a call to static before passing the url to Media.

This functionality has changed in master so I think this only exists in 1.8.

Change History (5)

comment:1 by Eric Whitmire, 9 years ago

Has patch: set

comment:2 by Simon Charette, 9 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Version: 1.8master

Please open a new PR against master, we'll take of backporting.

comment:3 by Simon Charette, 9 years ago

Patch needs improvement: unset
Version: master1.8

The master branch is not affected.

comment:4 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

Will add release notes and commit.

comment:5 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 901de5f:

[1.8.x] Fixed #24655 -- Fixed JavaScript path of contrib.admin's related field widget

Note: See TracTickets for help on using tickets.
Back to Top