Commits

Chris Moffitt committed a04c87a Merge

Merging.

Comments (0)

Files changed (3)

satchmo/apps/satchmo_store/shop/templates/admin/base_site.html

 {% extends "admin/base.html" %}
-{% load i18n admin_static satchmo_util%}
+{% load i18n adminmedia satchmo_util%}
 
 {% block extrahead %}
 {% blackbird_logging %}
 
 {% block extrastyle %}
 {{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% static "admin/css/base.css" %}" />
+<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/base.css" />
 <style type="text/css">
 #content-related { float:right; width:29em; position:relative; margin-right: -30em;}
 #content-related .module h2 { cursor: default; }

satchmo/apps/satchmo_store/shop/templates/admin/index.html

 {% extends "admin/base_site.html" %}
-{% load i18n admin_static app_plugins satchmo_util %}
+{% load i18n adminmedia app_plugins satchmo_util %}
 
-{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
+{% block extrastyle %}<link rel="stylesheet" type="text/css" href="{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css"/>{% endblock %}
 
 {% block coltype %}colMS{% endblock %}
 

satchmo/apps/satchmo_utils/admin.py

 from django.utils.safestring import mark_safe
 from django.utils.text import truncate_words
 from django.utils.functional import update_wrapper
-from django.contrib.admin.templatetags.admin_static import static
+# Commenting out for Django 1.3 compatibility
+# TODO: Need to find long term solution
+#from django.contrib.admin.templatetags.admin_static import static
 
 import operator
 
                 #lookup_%(name)s {
                     padding-right:16px;
                     background: url(
-                        %(admin_media_prefix)sselector-search.gif
+                        %(admin_media_prefix)simg/admin/selector-search.gif
                     ) no-repeat right;
                 }
                 #del_%(name)s {
             </style>
 <input type="text" id="lookup_%(name)s" value="%(label)s"/>
 <a href="#" id="del_%(name)s">
-<img src="%(admin_media_prefix)sicon_deletelink.gif" />
+<img src="%(admin_media_prefix)simg/admin/icon_deletelink.gif" />
 </a>
 <script type="text/javascript">
             var lookup = $('#lookup_%(name)s')
             </script>
         ''') % {
             'search_fields': ','.join(self.search_fields),
-            'admin_media_prefix': static('admin/img/'),
+            'admin_media_prefix': settings.ADMIN_MEDIA_PREFIX,
             'model_name': self.rel.to._meta.module_name,
             'app_label': self.rel.to._meta.app_label,
             'label': label,