Commit 56417103 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

remove some 3.6 deprecation warnings

--HG--
branch : stable
parent fae30f340e6c
......@@ -34,6 +34,7 @@ class LogFormView(basetemplates.LogFormView):
xml_escape(self._cw.build_url('forgottenpassword')),
self._cw._('Forgot your password ?')))
# First form, send an email
# -------------------------
......@@ -50,6 +51,7 @@ class ForgottenPasswordForm(forms.FieldsForm):
label=_('captcha'),
help=_('please copy the letters from the image'))
class ForgottenPasswordFormView(form.FormViewMixIn, StartupView):
__regid__ = 'forgottenpassword'
......@@ -71,7 +73,7 @@ class ForgottenPasswordSendMailController(controller.Controller):
msg = str(exc)
else:
msg = self._cw._(u'An email has been sent, follow instructions in there to change your password.')
raise Redirect(self.build_url('pwdsent', __message=msg))
raise Redirect(self._cw.build_url('pwdsent', __message=msg))
def checked_data(self):
'''only basic data check here (required attributes and password
......@@ -102,6 +104,7 @@ class PasswordSentView(StartupView):
def call(self):
self.wview('index', self.cw_rset)
# Second form, ask for a new password
# -----------------------------------
......@@ -142,7 +145,7 @@ class ForgottenPasswordRequestConfirm(controller.Controller):
def publish(self, rset=None):
data = self.checked_data()
msg = self.appli.repo.forgotpwd_change_passwd(data)
raise Redirect(self.build_url('pwdreset', __message=msg))
raise Redirect(self._cw.build_url('pwdreset', __message=msg))
def checked_data(self):
cw = self._cw
......@@ -203,6 +206,7 @@ def forgotpwd_send_email(self, data):
finally:
session.close()
@monkeypatch(Repository)
def forgotpwd_change_passwd(self, data):
session = self.internal_session()
......@@ -228,6 +232,7 @@ def forgotpwd_change_passwd(self, data):
finally:
session.close()
# URL rewriting
# -------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment