Пример #1
0
 def POST(self):
     i = web.input("oldpassword", "password", "password2")
     f = forms.login_preferences()
     if not f.validates(i):
         return render.login_preferences(f)
     else:
         try:
             user = web.ctx.site.update_user(i.oldpassword, i.password, None)
         except ClientException, e:
             f.note = str(e)
             return render.login_preferences(f)
         add_flash_message('info', 'Password updated successfully.')
         raise web.seeother("/account/preferences")
Пример #2
0
 def POST(self):
     i = web.input("oldpassword", "password", "password2")
     f = forms.login_preferences()
     if not f.validates(i):
         return render.login_preferences(f)
     else:
         try:
             user = web.ctx.site.update_user(i.oldpassword, i.password, None)
         except ClientException as e:
             f.note = str(e)
             return render.login_preferences(f)
         add_flash_message('info', 'Password updated successfully.')
         raise web.seeother("/account/preferences")
Пример #3
0
 def GET(self):
     f = forms.login_preferences()
     return render.login_preferences(f)
Пример #4
0
 def GET(self):
     f = forms.login_preferences()
     return render.login_preferences(f)