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

Merged
merged 1 commit into from Sep 1, 2011

Projects

None yet

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

thanks a lot

@ojii ojii merged commit 785b31a into divio:develop Sep 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment