Skip to content

Hardcoded links to admin media in css #274

Closed
claudep opened this Issue Nov 27, 2009 · 4 comments

2 participants

@claudep
claudep commented Nov 27, 2009

In /media/cms/css/change_form.css the path to 2 images is hardcoded to "/media/admin" : background:white url(/media/admin/img/admin/nav-bg.gif)
background: #7CA0C7 url(/media/admin/img/admin/default-bg.gif)
This leads to a 404 error when the ADMIN_MEDIA_PREFIX is different than /media/admin.

@digi604
Divio AG member
digi604 commented Nov 30, 2009

I ask myself how django.contrib.admin does this...

@claudep
claudep commented Nov 30, 2009

Well, when you know that the css is in the same media context than images, you can simply use a relative link (e.g. ../img/admin/nav-bg.gif), that's how does django.contrib.admin.
But in your case, it's not a solution, because you don't know the relative path between cms media and django admin media. IMHO, if it concerns only two basic images, the simplest way would be to copy the images in the cms/admin/images folder and to use relative path (btw nav-bg.gif is already copied). I know this does not respect the DRY principle, but i find this acceptable.

@digi604
Divio AG member
digi604 commented Dec 1, 2009

i think we move the CSS declaration of the images into the template

@digi604
Divio AG member
digi604 commented Dec 1, 2009

closed by 1f6953c css image path is now coherent with ADMIN_MEDIA_PREFIX

@christianbertschy christianbertschy pushed a commit to christianbertschy/django-cms-2.0 that referenced this issue Oct 1, 2012
@digi604 digi604 fixes #274 css image path is now coherent with ADMIN_MEDIA_PREFIX 1f6953c
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.