Skip to content
This repository
Browse code

load url from future

  • Loading branch information...
commit c831f68a516e625cf6e278a164ed9d39bc46945d 1 parent c97b244
Matthias Kestenholz authored
7 plata/shop/templates/base.html
... ... @@ -1,5 +1,6 @@
1 1 <html>
2 2 {% load i18n %}
  3 +{% load url from future %}
3 4 <head>
4 5 <title>{% block title %}Plata{% endblock %}</title>
5 6 <style type="text/css">
@@ -102,7 +103,7 @@
102 103 {% endblock %}
103 104
104 105 <hr />
105   -<a href="{% url plata_shop_cart %}">{% trans "Go to cart" %}</a>
  106 +<a href="{% url "plata_shop_cart" %}">{% trans "Go to cart" %}</a>
106 107 <hr />
107 108 <h2>{% trans "That's what we know about you:" %}</h2>
108 109 <table>
@@ -124,10 +125,10 @@
124 125 {% endfor %}
125 126 </ul>
126 127 {% if plata.order.id %}
127   - {% url plata_reporting_invoice_pdf plata.order.id as invoice_url %}
  128 + {% url "plata_reporting_invoice_pdf" plata.order.id as invoice_url %}
128 129 {% if invoice_url %}<a href="{{ invoice_url }}">Invoice</a>{% endif %}
129 130 {% endif %}
130   - {% url plata_reporting_product_xls as product_xls_url %}
  131 + {% url "plata_reporting_product_xls" as product_xls_url %}
131 132 {% if product_xls_url %}<a href="{{ product_xls_url }}">Products</a>{% endif %}
132 133 </td>
133 134 </tr>
5 plata/shop/templates/payment/paypal_form.html
... ... @@ -1,6 +1,7 @@
1 1 {% extends "base.html" %}
2 2
3 3 {% load i18n %}
  4 +{% load url from future %}
4 5
5 6 {% block content %}
6 7 <h1>{% trans "Payment" %}</h1>
@@ -10,7 +11,7 @@
10 11 <form action="{{ post_url }}" method="post" id="paypalform">
11 12 <input type="hidden" name="business" value="{{ business }}" />
12 13 <input type="hidden" name="currency_code" value="{{ order.currency }}" />
13   -<input type="hidden" name="return" value="http://{{ HTTP_HOST }}{% url plata_order_success %}" />
  14 +<input type="hidden" name="return" value="http://{{ HTTP_HOST }}{% url "plata_order_success" %}" />
14 15
15 16 <input type="hidden" name="cmd" value="_cart" />
16 17 <input type="hidden" name="upload" value="1" />
@@ -52,7 +53,7 @@
52 53 <input type="hidden" name="email" value="{{ order.email }}" />
53 54 <input type="hidden" name="address_override" value="0" />
54 55
55   - <input type="hidden" name="notify_url" value="http://{{ HTTP_HOST }}{% url plata_payment_paypal_ipn %}" />
  56 + <input type="hidden" name="notify_url" value="http://{{ HTTP_HOST }}{% url "plata_payment_paypal_ipn" %}" />
56 57 <input type="submit" value="{% trans "Purchase Items" %}" />
57 58 </form>
58 59
9 plata/shop/templates/payment/postfinance_form.html
... ... @@ -1,6 +1,7 @@
1 1 {% extends "base.html" %}
2 2
3 3 {% load i18n %}
  4 +{% load url from future %}
4 5
5 6 {% block content %}
6 7 <h1>{% trans "Payment" %}</h1>
@@ -21,10 +22,10 @@
21 22 <input type="hidden" name="ownertown" value="{{ order.billing_city }}" />
22 23 <input type="hidden" name="ownercty" value="{{ order.billing_country }}" />
23 24
24   -<input type="hidden" name="accepturl" value="http://{{ HTTP_HOST }}{% url plata_order_success %}" />
25   -<input type="hidden" name="declineurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
26   -<input type="hidden" name="exceptionurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
27   -<input type="hidden" name="cancelurl" value="http://{{ HTTP_HOST }}{% url plata_order_payment_failure %}" />
  25 +<input type="hidden" name="accepturl" value="http://{{ HTTP_HOST }}{% url "plata_order_success" %}" />
  26 +<input type="hidden" name="declineurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
  27 +<input type="hidden" name="exceptionurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
  28 +<input type="hidden" name="cancelurl" value="http://{{ HTTP_HOST }}{% url "plata_order_payment_failure" %}" />
28 29
29 30 <input type="submit" value="{% trans "Pay now" %}" />
30 31 </form>
5 plata/shop/templates/plata/shop_order_payment_failure.html
... ... @@ -1,13 +1,14 @@
1 1 {% extends base_template|default:"base.html" %}
2 2
3 3 {% load i18n plata_tags %}
  4 +{% load url from future %}
4 5
5 6 {% block title %}{% trans "Order payment failure" %} - {{ block.super }}{% endblock %}
6 7
7 8 {% block content %}
8 9 <h1>{% trans "Order payment failure" %}</h1>
9 10
10   -<button type="button" onclick="window.location.href='{% url plata_shop_cart %}'">{% trans "Cart" %}</button>
  11 +<button type="button" onclick="window.location.href='{% url "plata_shop_cart" %}'">{% trans "Cart" %}</button>
11 12
12   -<button type="button" onclick="window.location.href='{% url plata_order_new %}'">{% trans "Create new order" %}</button>
  13 +<button type="button" onclick="window.location.href='{% url "plata_order_new" %}'">{% trans "Create new order" %}</button>
13 14 {% endblock %}
3  plata/shop/templates/plata/shop_order_success.html
... ... @@ -1,6 +1,7 @@
1 1 {% extends base_template|default:"base.html" %}
2 2
3 3 {% load i18n plata_tags %}
  4 +{% load url from future %}
4 5
5 6 {% block title %}{% trans "Order successful" %} - {{ block.super }}{% endblock %}
6 7
@@ -19,5 +20,5 @@
19 20
20 21 {% include "plata/_order_overview.html" %}
21 22
22   -<button type="button" onclick="window.location.href='{% url plata_order_new %}'">{% trans "Create new order" %}</button>
  23 +<button type="button" onclick="window.location.href='{% url "plata_order_new" %}'">{% trans "Create new order" %}</button>
23 24 {% endblock %}

0 comments on commit c831f68

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