#3417 closed (wontfix)
Admin interface template tags expect ADMIN_MEDIA_PREFIX to be a complete URL.
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 0.95 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The template tags for django.contrib.admin, when correcting the relative urls for static data, either expect settings.ADMIN_MEDIA_PREFIX to be a complete URL instead of prepending it with settings.MEDIA_URL.
I've created a patch affecting admin_list.py, admin_modify.py, and adminmedia.py.
Two things I'm not certain of, the affects the patch has on the adhoc javascript function SelectFilter in admin_modify.py, and also how it affects the functionality of having the development server serve static data.
Attachments (1)
Change History (9)
by , 18 years ago
Attachment: | django-hb.diff added |
---|
comment:1 by , 18 years ago
Needs documentation: | set |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
#2891 also talks about changing ADMIN_MEDIA_PREFIX
.
comment:2 by , 17 years ago
-1 on this, as it then limits ADMIN_MEDIA_PREFIX to being in MEDIA_URL, when you may want different paths.
This may also create problems in runserver, due to the automatic mapping of the admin media.
comment:3 by , 17 years ago
Collin, I think you're missing what it does. If you use an absolute path for ADMIN_MEDIA_PREFIX
, you'll see no change. It's just for if it's a relative path:
>>> from urlparse import urljoin >>> urljoin('/media/', '/admin_media/') # How most people have it - won't break anything '/admin_media/' >>> urljoin('/media/', 'admin/') # What this patch will allow '/media/admin/'
comment:5 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Marking wontfix -- this is how ADMIN_MEDIA_PREFIX is supposed to work. Also, it's simply too much of a backwards-incompatible change (for little reason).
comment:6 by , 17 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
I'm not exactly passionate about this ticket, but how is this backwards-incompatible? Current if you've got an absolute path for ADMIN_MEDIA_PREFIX (like everyone currently does) there is no change to behaviour.
All this introduces is new functionality of allowing the use of a relative path as your ADMIN_MEDIA_PREFIX.
comment:7 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
This just isn't worth it, sorry.
Patch for templatetags, relevant to 0.95.1 release