authsquare/app/modules/public/forgot.py

31 lines
1.1 KiB
Python
Raw Normal View History

2024-07-27 11:40:15 +07:00
from mako.template import Template
from config import globalvar
from bottle import request
class forgot:
def __init__(self):
pass
def html(self, params):
active_page = "Forgot"
user_roles = [0]
beaker_session = request.environ.get('beaker.session')
jwt = beaker_session["token"] if "token" in beaker_session else None
if jwt is not None:
return redirect('/')
else:
return Template(params["mako"]["website"]['index']).render(
title = globalvar.title,
header = globalvar.header,
navbar = Template(params["mako"]["website"]['navbar']).render(
menu = globalvar.menu['public']['navbar'],
user_roles = user_roles,
active_page = active_page
),
footer = Template(params["mako"]["website"]['footer']).render(
copyright = globalvar.copyright,
),
container = Template(params["mako"]["website"]['container']).render()
)