Redirect new user to key generation view
This commit is contained in:
		
					parent
					
						
							
								4b89e71b1f
							
						
					
				
			
			
				commit
				
					
						d395735219
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -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