Skip to content

Commit

Permalink
Merge pull request #16 from styleseat/static_assets
Browse files Browse the repository at this point in the history
Futurize URLs so compress can run
  • Loading branch information
jgaren committed May 10, 2015
2 parents 4475311 + 1059ce8 commit 707a7e3
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion examples/demo/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// GLOBALS
var grappelli = {},
// TODO: klemens: drop ADMIN_URL
ADMIN_URL = "{% url admin:index %}",
ADMIN_URL = "{% url 'admin:index' %}",
MODEL_URL_ARRAY = {% get_content_types %},
DATE_FORMAT = "{% get_date_format %}",
TIME_FORMAT = "{% get_time_format %}",
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/templates/admin/product/search_products.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% block content %}
<div id="search-products">
<div class="search filter module">
<form action="{% url admin:search-products %}" method="get" id="search-product">
<form action="{% url 'admin:search-products' %}" method="get" id="search-product">
<input type="text" id="searchbar" name="q">
<button class="search" type="submit" value="" name="search" >&nbsp;</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/templates/admin/product/search_variants.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% block content %}
<div id="search-products">
<div class="search filter module">
<form action="{% url admin:search-variants %}" method="get" id="search-product">
<form action="{% url 'admin:search-variants' %}" method="get" id="search-product">
<input type="text" id="searchbar" name="q">
<button class="search" type="submit" value="" name="search" >&nbsp;</button>
</form>
Expand Down
10 changes: 5 additions & 5 deletions examples/demo/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{% block top-bar %}
<div id="header" class="container_24">
<a class="logo grid_3" href="{% url home-page %}"><img src="{{ STATIC_URL }}img/logo.png" alt="{% trans "Satchless Demo" %}" /></a>
<a class="logo grid_3" href="{% url 'home-page' %}"><img src="{{ STATIC_URL }}img/logo.png" alt="{% trans "Satchless Demo" %}" /></a>
<ul class="menu grid_15">
{% for category in root_categories %}
<li>
Expand All @@ -28,7 +28,7 @@
</li>
{% endfor %}
<li class="sale">
<a href="{% url sale %}">SALE</a>
<a href="{% url 'sale' %}">SALE</a>
</li>
<li class="about-us">
<a href="{# url sale #}">About us</a>
Expand All @@ -38,15 +38,15 @@
</li>
</ul>
<div class="shortcuts grid_6">
<form class="search" method="get" action="{% url satchless-search-haystack-predictive %}"><input class="q" type="text" name="q" value="{{ request.GET.keywords }}" /><input class="submit" type="submit" value="Search" /></form>
<form class="search" method="get" action="{% url 'satchless-search-haystack-predictive' %}"><input class="q" type="text" name="q" value="{{ request.GET.keywords }}" /><input class="submit" type="submit" value="Search" /></form>
<ul class="languages">{% spaceless %}
{% for lang in LANGUAGES %}
<li class="{% if forloop.first %}first{% endif %}">{% if lang.0 == LANGUAGE_CODE %}{{ lang.1 }}{% else %}<a href="{{ request.path|chlocale:lang.0 }}">{{ lang.1 }}</a>{% endif %}</li>
{% endfor %}
{% endspaceless %}</ul>
<div class="carts">
<a class="wishlist" href="{% url wishlist:details %}">{{ wishlist_size|floatformat:0 }}<img src="{{ STATIC_URL }}img/icons/wishlist.png" alt="wishlist" /></a>
<a href="{% url cart:details %}">{{ cart_size|floatformat:0 }}<img src="{{ STATIC_URL }}img/icons/cart.png" alt="cart" /></a>
<a class="wishlist" href="{% url 'wishlist:details' %}">{{ wishlist_size|floatformat:0 }}<img src="{{ STATIC_URL }}img/icons/wishlist.png" alt="wishlist" /></a>
<a href="{% url 'cart:details' %}">{{ cart_size|floatformat:0 }}<img src="{{ STATIC_URL }}img/icons/cart.png" alt="cart" /></a>
</div>
</div>
<div class="grid_24">
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/templates/satchless/cart/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</tr>
<tr class="checkout">
<td colspan="5">
<form action="{% url checkout:prepare-order %}" method="post">
<form action="{% url 'checkout:prepare-order' %}" method="post">
{% csrf_token %}
<button class="button" type="submit"><span>{% trans "Go to checkout" %}</span></button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/templates/satchless/cart/wishlist/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h2><a href="{{ product.get_absolute_url }}">{{ variant.product.name }}</a></h2>
Inclusive VAT <br />
Exclusive shipping costs<br />
</p>
<form action="{% url wishlist:add-to-cart cart_item.id %}" method="post">
<form action="{% url 'wishlist:add-to-cart' cart_item.id %}" method="post">
{% csrf_token %}
<input class="cart" name="satchless_cart" type="submit" value="{% trans "Add to cart" %}" />
</form>
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/templates/satchless/checkout/checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block breadcrumbs %}
<li>
<a href="{% url cart:details %}">1. {% trans "Cart" %}</a>
<a href="{% url 'cart:details' %}">1. {% trans "Cart" %}</a>
</li>
<li class="active">
2. {% trans "Delivery" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block breadcrumbs %}
<li>
<a href="{% url cart:details %}">1. {% trans "Cart" %}</a>
<a href="{% url 'cart:details' %}">1. {% trans "Cart" %}</a>
</li>
<li class="active">
2. {% trans "Delivery" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
{% block body-class %}{{ block.super }} payment-choice{% endblock %}
{% block breadcrumbs %}
<li>
<a href="{% url cart:details %}">1. {% trans "Cart" %}</a>
<a href="{% url 'cart:details' %}">1. {% trans "Cart" %}</a>
</li>
<li>
<a href="{% url checkout:checkout order.token %}">2. {% trans "Delivery" %}</a>
<a href="{% url 'checkout:checkout' order.token %}">2. {% trans "Delivery" %}</a>
</li>
<li class="active">
3. {% trans "Payment" %}
Expand Down
2 changes: 1 addition & 1 deletion satchless/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
The Django e-commerce framework for perfectionists who also care about code
quality.
'''
VERSION = (0, 0, 18)
VERSION = (0, 0, 19)
4 changes: 2 additions & 2 deletions satchless/cart/templates/satchless/cart/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1>{% trans "My cart" %}</h1>
{{ item_price|tax|floatformat:2 }} <span class="currency">{{ cart.currency }}</span>
</td>
<td rowspan="2">
<form method="POST" action="{% url cart:remove-item form.instance.id %}">
<form method="POST" action="{% url 'cart:remove-item' form.instance.id %}">
{% csrf_token %}
<button type="submit">{% trans "Delete" %}</button>
</form>
Expand Down Expand Up @@ -88,7 +88,7 @@ <h1>{% trans "My cart" %}</h1>
</tr>
</tfoot>
</table>
<form action="{% url checkout:prepare-order %}" method="post">
<form action="{% url 'checkout:prepare-order' %}" method="post">
{% csrf_token %}
<button type="submit">{% trans "Check out" %}</button>
</form>
Expand Down
6 changes: 3 additions & 3 deletions satchless/cart/templates/satchless/cart/view_ajax.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1>{% trans "My cart" %}</h1>
<tr class="item">
<td rowspan="2">{{ forloop.counter }}</td>
<td rowspan="2">{% promote form.instance.variant as variant %}
<a href="{% url product:details variant.product.slug variant.product.pk %}">{{ variant }}</a>
<a href="{% url 'product:details' variant.product.slug variant.product.pk %}">{{ variant }}</a>
</td>
<td class="numerical unitPrice">
{{ unit_price|gross|floatformat:2 }} <span class="currency">{{ cart.currency }}</span><br />
Expand All @@ -48,7 +48,7 @@ <h1>{% trans "My cart" %}</h1>
{{ item_price|tax|floatformat:2 }} <span class="currency">{{ cart.currency }}</span>
</td>
<td rowspan="2">
<form method="POST" action="{% url cart:remove-item cart.typ form.instance.id %}">
<form method="POST" action="{% url 'cart:remove-item' cart.typ form.instance.id %}">
{% csrf_token %}
<button type="submit">{% trans "Delete" %}</button>
</form>
Expand Down Expand Up @@ -81,7 +81,7 @@ <h1>{% trans "My cart" %}</h1>
</tr>
</tfoot>
</table>
<form action="{% url checkout:prepare-order %}" method="post">
<form action="{% url 'checkout:prepare-order' %}" method="post">
{% csrf_token %}
<button type="submit">{% trans "Check out" %}</button>
</form>
2 changes: 1 addition & 1 deletion satchless/category/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_urls(self):
# paths
url(r'^$', self.category_list,
name='category-index'),
# this url simplifies url templatetag usage ({% url slug %} instead of {% url '' slug %})
# this url simplifies url templatetag usage ({% url 'slug' %} instead of {% url '' slug %})
url(r'^(?P<category_slug>[a-z0-9_-]+)/$',
self.category_details, name='category-details',
kwargs={'parent_slugs': ''}),
Expand Down
2 changes: 1 addition & 1 deletion satchless/contact/templates/satchless/contact/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
{% load i18n %}
{% block breadcrumbs %}
{{ block.super }}
<li><a href="{% url satchless-contact-my-contact %}">{% trans "My contact data" %}</a></li>
<li><a href="{% url 'satchless-contact-my-contact' %}">{% trans "My contact data" %}</a></li>
{% endblock %}
6 changes: 3 additions & 3 deletions satchless/contact/templates/satchless/contact/my_contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ <h3>{{ address.alias }}</h3>
{% endif %}
</p>
<p>
<a href="{% url satchless-contact-address-edit address.pk %}">{% trans "edit" %}</a>
<a href="{% url 'satchless-contact-address-edit' address.pk %}">{% trans "edit" %}</a>
</p>
</li>
{% endfor %}
</ul>
<p>
<a href="{% url satchless-contact-address-new %}">{% trans "Add new address" %}</a>
<a href="{% url 'satchless-contact-address-new' %}">{% trans "Add new address" %}</a>
</p>
{% else %}
<p>
{% trans "You have no address defined." %}
<a href="{% url satchless-contact-address-new %}">{% trans "Add a new one." %}</a>
<a href="{% url 'satchless-contact-address-new' %}">{% trans "Add a new one." %}</a>
</p>
{% endif %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{ item_price|tax|floatformat:2 }} <span class="currency">{{ cart.currency }}</span>
</td>
<td rowspan="2">
<form method="POST" action="{% url cart:remove-item cart.typ form.instance.id %}">
<form method="POST" action="{% url 'cart:remove-item' cart.typ form.instance.id %}">
{% csrf_token %}
<button type="submit">{% trans "Delete" %}</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion satchless/order/templates/satchless/order/my_orders.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'satchless/order/list.html' %}
{% load i18n %}
{% load urls from future %}
{% load url from future %}
{% block title %}{% trans "My orders" %}{% endblock %}
{% block breadcrumbs %}
{{ block.super }}
Expand Down

0 comments on commit 707a7e3

Please sign in to comment.