From 23b25002aeb713604c8b47e9814e5a8282bdc8d9 Mon Sep 17 00:00:00 2001
From: PCoder
Date: Sat, 1 Feb 2020 13:00:04 +0530
Subject: [PATCH] Take users to invoice url instead of orders
Orders need a VAT alignment fix
---
datacenterlight/tasks.py | 3 +-
.../datacenterlight/order_detail.html | 36 +++++++++----------
datacenterlight/views.py | 2 +-
3 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/datacenterlight/tasks.py b/datacenterlight/tasks.py
index 8b4626e8..55be8099 100644
--- a/datacenterlight/tasks.py
+++ b/datacenterlight/tasks.py
@@ -173,8 +173,7 @@ def create_vm_task(self, vm_template_id, user, specs, template, order_id):
context = {
'base_url': "{0}://{1}".format(user.get('request_scheme'),
user.get('request_host')),
- 'order_url': reverse('hosting:orders',
- kwargs={'pk': order_id}),
+ 'order_url': reverse('hosting:invoices'),
'page_header': _(
'Your New VM %(vm_name)s at Data Center Light') % {
'vm_name': vm.get('name')},
diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html
index 525a8a95..6f9d43f2 100644
--- a/datacenterlight/templates/datacenterlight/order_detail.html
+++ b/datacenterlight/templates/datacenterlight/order_detail.html
@@ -103,26 +103,26 @@
{% trans "Product" %}:
{{ request.session.template.name }}
-
+
diff --git a/datacenterlight/views.py b/datacenterlight/views.py
index 4307fcc3..385cf808 100644
--- a/datacenterlight/views.py
+++ b/datacenterlight/views.py
@@ -1154,7 +1154,7 @@ class OrderConfirmationView(DetailView, FormView):
response = {
'status': True,
'redirect': (
- reverse('hosting:orders')
+ reverse('hosting:invoices')
if request.user.is_authenticated()
else reverse('datacenterlight:index')
),