Commits

Hynek Cernoch  committed 1826488

Fixed staticfiles support for Django 1.3+. Closes #1331, #1347. part B) templates.

  • Participants
  • Parent commits e5831e0

Comments (0)

Files changed (9)

File satchmo/apps/payment/templates/shop/checkout/sagepay/pay_ship.html

 {% include "shop/_jquery.html" %}
 {% include "shop/_jquery_form.html" %}
 {% blackbird_logging %}
-<script type="text/javascript" src="{{ media_url }}js/satchmo_pay_ship.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/satchmo_pay_ship.js"></script>
 <script type="text/javascript"><!--
 $(function() {satchmo.setup_issue_fields({{ form.requires_issue_number|as_json }})});
 -->

File satchmo/apps/product/templates/product/admin/product_export_form.html

 </style>
 {% endblock %}
 {% block extrahead %}{{ block.super }}
-    <script src="{{media_url}}js/jquery.cookie.js" type="text/javascript"></script>
+    <script src="{{ STATIC_URL }}js/jquery.cookie.js" type="text/javascript"></script>
     <script type="text/javascript">
     var satchmo = satchmo || {};
     satchmo.toggle = function(cls, state) {

File satchmo/apps/product/templates/product/detail_configurableproduct.html

 
 {% include "shop/_jquery.html" %}
 {% include "shop/_jquery_form.html" %}
-<script type="text/javascript" src="{{media_url}}js/satchmo_product.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/satchmo_product.js"></script>
 {% blackbird_logging %}
 <script type="text/javascript">{# Javascript which is generated uniquely for each page #}
 satchmo.default_view_tax = {% if default_view_tax %}true{% else %}false{% endif %};

File satchmo/apps/satchmo_ext/satchmo_toolbar/templates/satchmo_toolbar/plugins/page_head.html

 	// '$' variable, so store a reference of it in a temporary variable...
 	var _$ = window.$;
 	if (typeof jQuery == 'undefined') {
-		var jquery_url = '{{ media_url }}js/jquery-1.4.2.js';
+		var jquery_url = '{{ STATIC_URL }}js/jquery-1.4.2.js';
 		document.write(unescape('%3Cscript src="' + jquery_url + '" type="text/javascript"%3E%3C/script%3E'));
 	}
 </script>

File satchmo/apps/satchmo_store/shop/templates/base.html

 {% endblock %}
 <head>
     {% block extra-head %}{% endblock %}
-    {% block stylesheet %}<link rel="stylesheet" href="{{ media_url }}css/style.css" />{% endblock %}
+    {% block stylesheet %}<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" />{% endblock %}
     <title>{% block title %}{{ shop_name }}{% if pagetitle %}: {{ pagetitle }}{% endif %}{% endblock %}</title>
     {% plugin_point "page_head" %}
 </head>

File satchmo/apps/satchmo_store/shop/templates/shop/_blackbird_logging.html

 {% load satchmo_util %}
 {% if debug %}
-<link rel="stylesheet" href="{{ media_url }}css/blackbird.css" />
-<script type="text/javascript" src="{{ media_url }}js/blackbird.js"></script>
+<link rel="stylesheet" href="{{ STATIC_URL }}css/blackbird.css" />
+<script type="text/javascript" src="{{ STATIC_URL }}js/blackbird.js"></script>
 {% if form %}
 <script type="text/javascript">
 	{% for key in form.errors %}log.debug("Form Error: {{ key }} : {{ form.errors|lookup:key|striptags|escape }}");
 </script>
 {% endif %}
 {% else %}
-<script type="text/javascript" src="{{ media_url }}js/satchmo_store.js"></script>
-{% endif %}
+<script type="text/javascript" src="{{ STATIC_URL }}js/satchmo_store.js"></script>
+{% endif %}

File satchmo/apps/satchmo_store/shop/templates/shop/_jquery.html

 {# override this template if you want to source jquery from a different location #}
 
-<script src="{{media_url}}js/jquery-1.4.2.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}js/jquery-1.4.2.js" type="text/javascript"></script>

File satchmo/apps/satchmo_store/shop/templates/shop/_jquery_form.html

 {# override this template if you want to source the jquery form library from a different location #}
 
-<script type="text/javascript" src="{{media_url}}js/jquery.form.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.form.js"></script>

File satchmo/apps/satchmo_utils/thumbnail/templates/widget/file.html

 {% load satchmo_thumbnail %}
 {% load admin_modify i18n %}{% if bound_field.original_value %}
-{% trans "Currently" %}: <a href ="{{media_url}}{{ bound_field.original_url}}"> <img src="{{ bound_field.original_url|thumbnail:"width=85" }}" width="85" /></a><br />
+{% trans "Currently" %}: <a href ="{{ STATIC_URL }}{{ bound_field.original_url}}"> <img src="{{ bound_field.original_url|thumbnail:"width=85" }}" width="85" /></a><br />
 {% trans "Change" %}:{% output_all bound_field.form_fields %}
 {% else %} {% output_all bound_field.form_fields %} {% endif %}