Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Replaced a {{ ADMIN_MEDIA_URL }} reference by a {% admin_media_prefix %} #976

Merged
merged 1 commit into from

2 participants

@charettes

Replaced a {{ ADMIN_MEDIA_URL }} reference by a {% admin_media_prefix %} to avoid image 404.
This was causing issues when viewing a page version since the images were loaded relatively to
the page since ADMIN_MEDIA_URL was an empty string.

e.g. If viewing 'admin/cms/page/2/history/64565/' it attempted to load 'admin/cms/page/2/history/64565/img/admin/nav-bg.gif' which caused a error 500 since pageadmin was trying to cast '2/history/64565/img/admin/nav-bg.gif' to int: obj = self.model.objects.get(pk=object_id)

@charettes charettes Replaced a {{ ADMIN_MEDIA_URL }} reference by a {% admin_media_prefix…
… %} to avoid image 404.

This was causing issues when viewing a page version since the images were loaded relatively to
the page since ADMIN_MEDIA_URL was an empty string.
785b31a
@ojii
Collaborator

thanks a lot

@ojii ojii merged commit 785b31a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 31, 2011
  1. @charettes

    Replaced a {{ ADMIN_MEDIA_URL }} reference by a {% admin_media_prefix…

    charettes authored
    … %} to avoid image 404.
    
    This was causing issues when viewing a page version since the images were loaded relatively to
    the page since ADMIN_MEDIA_URL was an empty string.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 cms/templates/admin/cms/page/change_form.html
View
4 cms/templates/admin/cms/page/change_form.html
@@ -36,7 +36,7 @@
margin-bottom:-1px;
border-color:#ddd #aaa #ccc #ddd !important;
border:1px;
- background:#fff url('{{ ADMIN_MEDIA_URL }}img/admin/nav-bg.gif') repeat-x center bottom !important;
+ background:#fff url('{% admin_media_prefix %}img/admin/nav-bg.gif') repeat-x center bottom !important;
}
#lang_tab_content h2.header {
@@ -45,7 +45,7 @@
font-size:11px;
text-align:left;
font-weight:bold;
- background:#7ca0c7 url('{{ ADMIN_MEDIA_URL }}img/admin/default-bg.gif') repeat-x left top;
+ background:#7ca0c7 url('{% admin_media_prefix %}img/admin/default-bg.gif') repeat-x left top;
color:#fff;
}
Something went wrong with that request. Please try again.