Merge pull request #277 from Modulos/fix_redirect

Correct vm configuration flow
This commit is contained in:
Noe 2017-05-25 16:27:34 +02:00 committed by GitHub
commit 8fee713ce8
2 changed files with 3 additions and 2 deletions

View file

@ -61,7 +61,7 @@
{% url 'hosting:payment' as payment_url %}
{% if payment_url in request.META.HTTP_REFERER %}
<div class=" content pull-right">
<a href="{% url 'hosting:key_pair'%}" ><button class="btn btn-info">{% trans "Finish Configuration"%}</button></a>
<a href="{% url 'hosting:virtual_machines'%}" ><button class="btn btn-info">{% trans "Finish Configuration"%}</button></a>
</div>
{% endif %}
</div>

View file

@ -188,10 +188,11 @@ class SignupView(CreateView):
template_name = 'hosting/signup.html'
form_class = HostingUserSignupForm
model = CustomUser
success_url = reverse_lazy('hosting:key_pair')
def get_success_url(self):
next_url = self.request.session.get(
'next', reverse_lazy('hosting:virtual_machines'))
'next', self.success_url)
return next_url
def form_valid(self, form):