Opened 18 years ago

Closed 18 years ago

#3199 closed enhancement (duplicate)

[patch] Admin option 'js' always prepends settings.ADMIN_MEDIA_PREFIX

Reported by: Jordi Funollet Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Unconditionaly prepending settings.ADMIN_MEDIA_PREFIX forces us to put application files in the Django tree. It would be easier to deploy applications if we could also prepend settings.MEDIA_URL.

The attached patch uses this convention for the strings in Admin.js:

  • If you want settings.ADMIN_MEDIA_PREFIX, use a relative path (as usual).
  • If you want settings.MEDIA_URL, put an initial '/' on your string.

Attachments (2)

include_admin_script_with_option.diff (395 bytes ) - added by Jordi Funollet <jordi.f@…> 18 years ago.
include_admin_script_with_option2.patch (756 bytes ) - added by Jordi Funollet <jordi.f@…> 18 years ago.
Same code, better patch format (I hope).

Download all attachments as: .zip

Change History (4)

by Jordi Funollet <jordi.f@…>, 18 years ago

by Jordi Funollet <jordi.f@…>, 18 years ago

Same code, better patch format (I hope).

comment:1 by Jordi Funollet <jordi.f@…>, 18 years ago

Summary: Admin option 'js' always prepends settings.ADMIN_MEDIA_PREFIX[patch] Admin option 'js' always prepends settings.ADMIN_MEDIA_PREFIX

comment:2 by Chris Beaven, 18 years ago

Resolution: duplicate
Status: newclosed

Dupe of #2869

In my opinion, if you put in an absolute URL then it'd make more sense to just leave it alone rather than still trying to prepend something.

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