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:
Pcoder 2017-06-15 21:04:03 +02:00 committed by GitHub
commit ebaadb4d07
2 changed files with 5 additions and 0 deletions

View File

@ -208,6 +208,7 @@ class SignupView(CreateView):
class PasswordResetView(PasswordResetViewMixin):
site = 'dcl'
template_name = 'hosting/reset_password.html'
form_class = PasswordResetRequestForm
success_url = reverse_lazy('hosting:login')

View File

@ -65,6 +65,8 @@ class LoginViewMixin(FormView):
class PasswordResetViewMixin(FormView):
# template_name = 'hosting/reset_password.html'
# 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_url = reverse_lazy('hosting:login')
@ -94,6 +96,8 @@ class PasswordResetViewMixin(FormView):
'template_name': 'password_reset_email',
'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.send()