invoice link fixed

This commit is contained in:
Arvind Tiwari 2017-08-19 02:32:37 +05:30
parent 377f82319d
commit de481e8114
2 changed files with 2 additions and 5 deletions

View file

@ -81,7 +81,7 @@
</div>
</div>
<div class="text-center">
<a class="btn btn-vm-back" href="">{% trans "BACK TO LIST" %}</a>
<a class="btn btn-vm-back" href="{% url 'hosting:virtual_machines' %}">{% trans "BACK TO LIST" %}</a>
</div>
</div>
<!-- Cancel Modal -->

View file

@ -822,10 +822,6 @@ class VirtualMachineView(LoginRequiredMixin, View):
print(error)
raise Http404()
def get_context_data(self):
context = super(VirtualMachineView, self).get_context_data(**kwargs)
context['order'] = HostingOrder.objects.get(vm_id=context['vm'].id)
def get_success_url(self):
final_url = reverse('hosting:virtual_machines')
return final_url
@ -838,6 +834,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
serializer = VirtualMachineSerializer(vm)
context = {
'virtual_machine': serializer.data,
'order': HostingOrder.objects.get(vm_id=serializer.data['vm_id'])
}
except:
pass