Merge pull request #277 from Modulos/fix_redirect
Correct vm configuration flow
This commit is contained in:
		
				commit
				
					
						8fee713ce8
					
				
			
		
					 2 changed files with 3 additions and 2 deletions
				
			
		|  | @ -61,7 +61,7 @@ | ||||||
|             {% url 'hosting:payment' as payment_url %} |             {% url 'hosting:payment' as payment_url %} | ||||||
|             {% if payment_url in request.META.HTTP_REFERER  %} |             {% if payment_url in request.META.HTTP_REFERER  %} | ||||||
|             <div class=" content pull-right"> |             <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> |             </div> | ||||||
|             {% endif %} |             {% endif %} | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|  | @ -188,10 +188,11 @@ class SignupView(CreateView): | ||||||
|     template_name = 'hosting/signup.html' |     template_name = 'hosting/signup.html' | ||||||
|     form_class = HostingUserSignupForm |     form_class = HostingUserSignupForm | ||||||
|     model = CustomUser |     model = CustomUser | ||||||
|  |     success_url = reverse_lazy('hosting:key_pair') | ||||||
| 
 | 
 | ||||||
|     def get_success_url(self): |     def get_success_url(self): | ||||||
|         next_url = self.request.session.get( |         next_url = self.request.session.get( | ||||||
|             'next', reverse_lazy('hosting:virtual_machines')) |             'next', self.success_url) | ||||||
|         return next_url |         return next_url | ||||||
| 
 | 
 | ||||||
|     def form_valid(self, form): |     def form_valid(self, form): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue