Merge branch 'task/3620/ssh_keys' of https://github.com/tiwariav/dynamicweb into bug/3638/ssh_key_without_download_option
This commit is contained in:
commit
2e9d838b64
18 changed files with 997 additions and 346 deletions
|
|
@ -21,7 +21,6 @@ def change_lang(context, lang=None, *args, **kwargs):
|
|||
|
||||
return "%s" % url
|
||||
|
||||
|
||||
@register.filter('get_value_from_dict')
|
||||
def get_value_from_dict(dict_data, key):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from hosting.models import HostingOrder, HostingBill
|
|||
from utils.stripe_utils import StripeUtils
|
||||
from datetime import datetime
|
||||
from membership.models import CustomUser, StripeCustomer
|
||||
|
||||
from oca.pool import WrongIdError
|
||||
from opennebula_api.models import OpenNebulaManager
|
||||
from opennebula_api.serializers import VirtualMachineTemplateSerializer, VirtualMachineSerializer, VMTemplateSerializer
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ class SuccessView(TemplateView):
|
|||
def get(self, request, *args, **kwargs):
|
||||
if 'specs' not in request.session or 'user' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
|
||||
elif 'token' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||
elif 'order_confirmation' not in request.session:
|
||||
|
|
@ -208,6 +209,7 @@ class IndexView(CreateView):
|
|||
|
||||
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
||||
for session_var in ['specs', 'user', 'billing_address_data']:
|
||||
if session_var in request.session:
|
||||
del request.session[session_var]
|
||||
|
|
@ -401,6 +403,7 @@ class PaymentOrderView(FormView):
|
|||
|
||||
# Create Billing Address
|
||||
billing_address = form.save()
|
||||
|
||||
request.session['billing_address_data'] = billing_address_data
|
||||
request.session['billing_address'] = billing_address.id
|
||||
request.session['token'] = token
|
||||
|
|
@ -416,6 +419,7 @@ class OrderConfirmationView(DetailView):
|
|||
context_object_name = "order"
|
||||
model = HostingOrder
|
||||
|
||||
|
||||
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
|
||||
def get(self, request, *args, **kwargs):
|
||||
if 'specs' not in request.session or 'user' not in request.session:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue