예제 #1
0
파일: main.py 프로젝트: ivanjzr/QuetzalCMS
 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()
예제 #2
0
 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)