fix invoice link

This commit is contained in:
Thomas Steen Rasmussen 2016-05-30 23:58:22 +02:00
parent ac5f31ef93
commit 7936a931b1
2 changed files with 3 additions and 3 deletions

View file

@ -28,8 +28,8 @@
<td class="text-center">{{ order.handed_out_status }}</td>
<td>
{% if order.invoice.pdf %}
{% url 'shop:download_invoice' pk=order.pk as order_download_url %}
{% bootstrap_button "PDF" icon="save-file" href=order_download_url button_class="btn-primary btn-xs" %}
{% url 'shop:download_invoice' pk=order.pk as invoice_download_url %}
{% bootstrap_button "PDF" icon="save-file" href=invoice_download_url button_class="btn-primary btn-xs" %}
{% else %}
N/A
{% endif %}

View file

@ -8,7 +8,7 @@ urlpatterns = [
url(r'orders/$', OrderListView.as_view(), name='order_list'),
url(r'orders/(?P<pk>[0-9]+)/$', OrderDetailView.as_view(), name='order_detail'),
url(r'orders/(?P<pk>[0-9]+)/$', DownloadInvoiceView.as_view(), name='download_invoice'),
url(r'orders/(?P<pk>[0-9]+)/invoice/$', DownloadInvoiceView.as_view(), name='download_invoice'),
url(r'orders/(?P<pk>[0-9]+)/pay/creditcard/$', EpayFormView.as_view(), name='epay_form'),
url(r'orders/(?P<pk>[0-9]+)/pay/creditcard/callback/$',EpayCallbackView.as_view(), name='epay_callback'),