diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 3e6a7141..b68f7408 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -51,6 +51,9 @@ class PricingView(TemplateView): request.session['template'] = VirtualMachineTemplateSerializer(template).data + if not request.user.is_authenticated(): + request.session['next'] = reverse('hosting:payment') + request.session['specs'] = { 'cpu':cores, 'memory': memory, diff --git a/hosting/templates/hosting/virtual_machine_key.html b/hosting/templates/hosting/virtual_machine_key.html index 157ceea8..f7780466 100644 --- a/hosting/templates/hosting/virtual_machine_key.html +++ b/hosting/templates/hosting/virtual_machine_key.html @@ -112,7 +112,7 @@ {%endif%} - +{{next_url}} {% if next_url %}