Created generic view for vm pricing widget, Added VM configuration info on VM detail view, Fixed template bugs. Fixed Blog urls bugs
This commit is contained in:
parent
9aa732626f
commit
e90c5fece0
7 changed files with 99 additions and 14 deletions
|
|
@ -1,18 +1,21 @@
|
|||
from django.shortcuts import redirect
|
||||
from django.core.urlresolvers import reverse
|
||||
from .models import VirtualMachinePlan
|
||||
|
||||
|
||||
class ProcessVMSelectionMixin(object):
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
hosting = request.POST.get('configuration')
|
||||
configuration_detail = dict(VirtualMachinePlan.VM_CONFIGURATION).get(hosting)
|
||||
vm_specs = {
|
||||
'cores': request.POST.get('cores'),
|
||||
'memory': request.POST.get('memory'),
|
||||
'disk_size': request.POST.get('disk_space'),
|
||||
'hosting_company': request.POST.get('hosting_company'),
|
||||
'location_code': request.POST.get('location_code'),
|
||||
'configuration': request.POST.get('configuration'),
|
||||
'configuration_detail': request.POST.get('configuration_detail'),
|
||||
'configuration': hosting,
|
||||
'configuration_detail': configuration_detail,
|
||||
'final_price': request.POST.get('final_price')
|
||||
}
|
||||
request.session['vm_specs'] = vm_specs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue