def GET(self): try: authorized_user = operations.authenticate() render = tmpl.render('main_index') return render.display(web.ctx.lang) except Exception as e: raise web.notfound()
def GET(self): try: web.header("Cache-Control", "no-cache, no-store, must-revalidate") #If already logged successfully and user want to enter login again #just redirect to main index if is not authenticated just render login result = operations.authenticate() if result['r']=="ok": web.seeother('/main/index') except:pass try: render = tmpl.render("login") return render.display(web.ctx.lang) except Exception as e: return str(e)