Skip to content
Browse files

load url from future

  • Loading branch information...
1 parent c97b244 commit c831f68a516e625cf6e278a164ed9d39bc46945d @matthiask committed Sep 19, 2012
View
7 plata/shop/templates/base.html
@@ -1,5 +1,6 @@
<html>
{% load i18n %}
+{% load url from future %}
<head>
<title>{% block title %}Plata{% endblock %}</title>
<style type="text/css">
@@ -102,7 +103,7 @@
{% endblock %}
<hr />
-<a href="{% url plata_shop_cart %}">{% trans "Go to cart" %}</a>
+<a href="{% url "plata_shop_cart" %}">{% trans "Go to cart" %}</a>
<hr />
<h2>{% trans "That's what we know about you:" %}</h2>
<table>
@@ -124,10 +125,10 @@
{% endfor %}
</ul>
{% if plata.order.id %}
- {% url plata_reporting_invoice_pdf plata.order.id as invoice_url %}
+ {% url "plata_reporting_invoice_pdf" plata.order.id as invoice_url %}
{% if invoice_url %}<a href="{{ invoice_url }}">Invoice</a>{% endif %}
{% endif %}
- {% url plata_reporting_product_xls as product_xls_url %}
+ {% url "plata_reporting_product_xls" as product_xls_url %}
{% if product_xls_url %}<a href="{{ product_xls_url }}">Products</a>{% endif %}
</td>
</tr>
View
5 plata/shop/templates/payment/paypal_form.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block content %}
<h1>{% trans "Payment" %}</h1>
@@ -10,7 +11,7 @@
<form action="{{ post_url }}" method="post" id="paypalform">
<input type="hidden" name="business" value="{{ business }}" />
<input type="hidden" name="currency_code" value="{{ order.currency }}" />
-<input type="hidden" name="return" value="http://{{ HTTP_HOST }}{% url plata_order_success %}" />
+<input type="hidden" name="return" value="http://{{ HTTP_HOST }}{% url "plata_order_success" %}" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
@@ -52,7 +53,7 @@
<input type="hidden" name="email" value="{{ order.email }}" />
<input type="hidden" name="address_override" value="0" />
- <input type="hidden" name="notify_url" value="http://{{ HTTP_HOST }}{% url plata_payment_paypal_ipn %}" />
+ <input type="hidden" name="notify_url" value="http://{{ HTTP_HOST }}{% url "plata_payment_paypal_ipn" %}" />
<input type="submit" value="{% trans "Purchase Items" %}" />
</form>
View
9 plata/shop/templates/payment/postfinance_form.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block content %}
<h1>{% trans "Payment" %}</h1>
@@ -21,10 +22,10 @@
<input type="hidden" name="ownertown" value="{{ order.billing_city }}" />
<input type="hidden" name="ownercty" value="{{ order.billing_country }}" />
-<input type="hidden" name="accepturl" value="http://{{ HTTP_HOST }}{% url plata_order_success %}" />
-<input type="hidden" name="declineurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
-<input type="hidden" name="exceptionurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
-<input type="hidden" name="cancelurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
+<input type="hidden" name="accepturl" value="http://{{ HTTP_HOST }}{% url "plata_order_success" %}" />
+<input type="hidden" name="declineurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
+<input type="hidden" name="exceptionurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
+<input type="hidden" name="cancelurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
<input type="submit" value="{% trans "Pay now" %}" />
</form>
View
5 plata/shop/templates/plata/shop_order_payment_failure.html
@@ -1,13 +1,14 @@
{% extends base_template|default:"base.html" %}
{% load i18n plata_tags %}
+{% load url from future %}
{% block title %}{% trans "Order payment failure" %} - {{ block.super }}{% endblock %}
{% block content %}
<h1>{% trans "Order payment failure" %}</h1>
-<button type="button" onclick="window.location.href='{% url plata_shop_cart %}'">{% trans "Cart" %}</button>
+<button type="button" onclick="window.location.href='{% url "plata_shop_cart" %}'">{% trans "Cart" %}</button>
-<button type="button" onclick="window.location.href='{% url plata_order_new %}'">{% trans "Create new order" %}</button>
+<button type="button" onclick="window.location.href='{% url "plata_order_new" %}'">{% trans "Create new order" %}</button>
{% endblock %}
View
3 plata/shop/templates/plata/shop_order_success.html
@@ -1,6 +1,7 @@
{% extends base_template|default:"base.html" %}
{% load i18n plata_tags %}
+{% load url from future %}
{% block title %}{% trans "Order successful" %} - {{ block.super }}{% endblock %}
@@ -19,5 +20,5 @@
{% include "plata/_order_overview.html" %}
-<button type="button" onclick="window.location.href='{% url plata_order_new %}'">{% trans "Create new order" %}</button>
+<button type="button" onclick="window.location.href='{% url "plata_order_new" %}'">{% trans "Create new order" %}</button>
{% endblock %}

0 comments on commit c831f68

Please sign in to comment.
Something went wrong with that request. Please try again.