media-admin missing gifs

670 views
Skip to first unread message

Anderson Goulart

unread,
Nov 10, 2010, 3:25:38 PM11/10/10
to Django users

Hello,

I am just trying to modify django-admin templates and everything appears to work except icon_calendar.gif which does not appear. I set ADMIN_MEDIA_PREFIX = '/media_admin/' in settings.py, but it insists it is not defined. The estrange thing is that icon_addlink.gif icon works perfectly on the same page as I show below the 2 elements.

<img src="/missing-admin-media-prefix/img/admin/icon_calendar.gif">

<img src="/media_admin/img/admin/icon_addlink.gif" width="10" height="10">


Anybody has an idea what cause this problem?


thanks in advance,
global

Karen Tracey

unread,
Nov 10, 2010, 9:32:18 PM11/10/10
to django...@googlegroups.com

Looks like your admin base.html template is missing the bit of javascript that stores the admin media prefix on the window, see:

http://code.djangoproject.com/changeset/13002

Karen
--
http://tracey.org/kmt/

Anderson Goulart

unread,
Nov 14, 2010, 7:34:33 PM11/14/10
to django...@googlegroups.com
That's it... I added the script tag below and the images just appeared.

<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>


But now the OpenCalendar and OpenClock does not appear. Any clues?


Atenciosamente,
Anderson Goulart

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply all
Reply to author
Forward
0 new messages