From 34d596f2baa92a6834299cca36544a161adfb838 Mon Sep 17 00:00:00 2001 From: Levi Date: Sun, 21 May 2017 22:46:31 -0500 Subject: [PATCH] added next url to ssh create key view --- hosting/templates/hosting/virtual_machine_key.html | 2 +- hosting/urls.py | 2 +- hosting/views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/templates/hosting/virtual_machine_key.html b/hosting/templates/hosting/virtual_machine_key.html index 4eaaf10f..157ceea8 100644 --- a/hosting/templates/hosting/virtual_machine_key.html +++ b/hosting/templates/hosting/virtual_machine_key.html @@ -115,7 +115,7 @@ {% if next_url %} {% endif %} diff --git a/hosting/urls.py b/hosting/urls.py index abfb8d5f..f09d3aa7 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -19,7 +19,7 @@ urlpatterns = [ url(r'bills/?$', HostingBillListView.as_view(), name='bills'), url(r'bills/(?P\d+)/?$', HostingBillDetailView.as_view(), name='bills'), url(r'cancel_order/(?P\d+)/?$', OrdersHostingDeleteView.as_view(), name='delete_order'), - url(r'create-virtual-machine/?$', CreateVirtualMachinesView.as_view(), name='create-virtual-machine'), + url(r'create-virtual-machine/?$', CreateVirtualMachinesView.as_view(), name='create_virtual_machine'), url(r'my-virtual-machines/?$', VirtualMachinesPlanListView.as_view(), name='virtual_machines'), url(r'my-virtual-machines/(?P\d+)/?$', VirtualMachineView.as_view(), name='virtual_machines'), diff --git a/hosting/views.py b/hosting/views.py index 15306e13..b8b04b7d 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -324,7 +324,7 @@ class GenerateVMSSHKeysView(LoginRequiredMixin, FormView): 'private_key': form.cleaned_data.get('private_key'), 'key_name': form.cleaned_data.get('name'), 'form': UserHostingKeyForm(request=self.request), - 'next_url': self.request.session.get('next', None) + 'next_url': reverse('hosting:create_virtual_machine') }) # return HttpResponseRedirect(reverse('hosting:key_pair'))