fixed payment issues

This commit is contained in:
Levi 2017-05-06 17:36:02 -05:00
parent ed806910e6
commit ac9ba1480b
2 changed files with 6 additions and 5 deletions

View file

@ -11,11 +11,11 @@
<form method="POST" action=""> <form method="POST" action="">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
Select VM Type: Select VM:
<select name="vm_template"> <select name="vm_template">
{% for vm in vm_types %} {% for vm in vm_types %}
<option value="{{vm.id}}">CORE: {{vm.cores}}- RAM: {{vm.memory}} - SSD: {{vm.disk_size}} </option> <option value="{{vm.id}}">CORE: {{vm.cores}}, RAM: {{vm.memory}}, SSD: {{vm.disk_size}} </option>
{% endfor %} {% endfor %}
</select> </select>

View file

@ -348,9 +348,9 @@ class PaymentVMView(LoginRequiredMixin, FormView):
# 'vm_template': vm_template # 'vm_template': vm_template
# } # }
# hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin) hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin)
# hosting_admin.init_opennebula_client(request) hosting_admin.init_opennebula_client(request)
# hosting_admin.create(request) hosting_admin.create(request)
# Send notification to ungleich as soon as VM has been booked # Send notification to ungleich as soon as VM has been booked
context = { context = {
@ -442,6 +442,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
'final_price': vm_type.final_price, 'final_price': vm_type.final_price,
'vm_template': vm_template 'vm_template': vm_template
}) })
request.session['vm_specs'] = vm_specs
return redirect(reverse('hosting:payment')) return redirect(reverse('hosting:payment'))
# def get_queryset(self): # def get_queryset(self):