Merge pull request #330 from pcoder/bug/3313/pwd_reset_email_from_dcl_support
Bug/3313/pwd reset email from dcl support
This commit is contained in:
		
				commit
				
					
						ebaadb4d07
					
				
			
		
					 2 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -208,6 +208,7 @@ class SignupView(CreateView):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PasswordResetView(PasswordResetViewMixin):
 | 
					class PasswordResetView(PasswordResetViewMixin):
 | 
				
			||||||
 | 
					    site = 'dcl'
 | 
				
			||||||
    template_name = 'hosting/reset_password.html'
 | 
					    template_name = 'hosting/reset_password.html'
 | 
				
			||||||
    form_class = PasswordResetRequestForm
 | 
					    form_class = PasswordResetRequestForm
 | 
				
			||||||
    success_url = reverse_lazy('hosting:login')
 | 
					    success_url = reverse_lazy('hosting:login')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,6 +65,8 @@ class LoginViewMixin(FormView):
 | 
				
			||||||
class PasswordResetViewMixin(FormView):
 | 
					class PasswordResetViewMixin(FormView):
 | 
				
			||||||
    # template_name = 'hosting/reset_password.html'
 | 
					    # template_name = 'hosting/reset_password.html'
 | 
				
			||||||
    # form_class = PasswordResetRequestForm
 | 
					    # form_class = PasswordResetRequestForm
 | 
				
			||||||
 | 
					    success_message = "The link to reset your email has been sent to your email"
 | 
				
			||||||
 | 
					    site = ''
 | 
				
			||||||
    success_message = "Thank you! You will shortly receive a password reset mail from us"
 | 
					    success_message = "Thank you! You will shortly receive a password reset mail from us"
 | 
				
			||||||
    # success_url = reverse_lazy('hosting:login')
 | 
					    # success_url = reverse_lazy('hosting:login')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -94,6 +96,8 @@ class PasswordResetViewMixin(FormView):
 | 
				
			||||||
            'template_name': 'password_reset_email',
 | 
					            'template_name': 'password_reset_email',
 | 
				
			||||||
            'template_path': self.template_email_path
 | 
					            'template_path': self.template_email_path
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if self.site == 'dcl':
 | 
				
			||||||
 | 
					            email_data['from_address'] = '(Data Center Light) Data Center Light Support <support@datacenterlight.ch>'
 | 
				
			||||||
        email = BaseEmail(**email_data)
 | 
					        email = BaseEmail(**email_data)
 | 
				
			||||||
        email.send()
 | 
					        email.send()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue