def POST(self): # Reads the form parameters & the previously requested path (if any) http_input = web.input(next="/") email = http_input.email password = http_input.password requested_path = http_input.next #TODO: horrible fix to circumvent encoding problems persistent = any(key.startswith("Rester") for key in http_input) # Tries to log in, and redirects to the previously requested path (if any) if config.session_manager.maybe_login(email, password, persistent): raise web.seeother(requested_path) else: login_form = user_forms.login_form(email, persistent) login_form.valid = False return config.views.layout(config.views.login(login_form, user_forms.recover_password_form()))
def POST(self): # Reads the form parameters & the previously requested path (if any) http_input = web.input(next="/") email = http_input.email password = http_input.password requested_path = http_input.next #TODO: horrible fix to circumvent encoding problems persistent = any(key.startswith("Rester") for key in http_input) # Tries to log in, and redirects to the previously requested path (if any) if config.session_manager.maybe_login(email, password, persistent): raise web.seeother(requested_path) else: login_form = user_forms.login_form(email, persistent) login_form.valid = False return config.views.layout( config.views.login(login_form, user_forms.recover_password_form()))
def GET(self): return config.views.layout(config.views.login(user_forms.login_form(), user_forms.recover_password_form()))
def GET(self): return config.views.layout( config.views.login(user_forms.login_form(), user_forms.recover_password_form()))