Add get method to hosting.SignupView and cache_control
This commit is contained in:
		
					parent
					
						
							
								87cdb08f3c
							
						
					
				
			
			
				commit
				
					
						bec541c06a
					
				
			
		
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -239,6 +239,12 @@ class SignupView(CreateView): | |||
| 
 | ||||
|         return HttpResponseRedirect(reverse_lazy('hosting:signup-validate')) | ||||
| 
 | ||||
|     @cache_control(no_cache=True, must_revalidate=True, no_store=True) | ||||
|     def get(self, request, *args, **kwargs): | ||||
|         if self.request.user.is_authenticated(): | ||||
|             return HttpResponseRedirect(self.get_success_url()) | ||||
|         return super(SignupView, self).get(request, *args, **kwargs) | ||||
| 
 | ||||
| 
 | ||||
| class SignupValidateView(TemplateView): | ||||
|     template_name = "hosting/signup_validate.html" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue