Opened 8 years ago

Closed 8 years ago

#3199 closed enhancement (duplicate)

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

Reported by: Jordi Funollet Owned by: adrian
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: UI/UX:

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@…> 8 years ago.
include_admin_script_with_option2.patch (756 bytes) - added by Jordi Funollet <jordi.f@…> 8 years ago.
Same code, better patch format (I hope).

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Jordi Funollet <jordi.f@…>

Changed 8 years ago by Jordi Funollet <jordi.f@…>

Same code, better patch format (I hope).

comment:1 Changed 8 years ago by Jordi Funollet <jordi.f@…>

  • Summary changed from Admin option 'js' always prepends settings.ADMIN_MEDIA_PREFIX to [patch] Admin option 'js' always prepends settings.ADMIN_MEDIA_PREFIX

comment:2 Changed 8 years ago by SmileyChris

  • Resolution set to duplicate
  • Status changed from new to closed

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