authsquare/app/modules/public/register.py

42 lines
1.5 KiB
Python
Raw Normal View History

from mako.template import Template
from config import globalvar
from scripts import loggorilla
import procedure.validation as procedure_validation
2024-06-17 17:33:29 +07:00
class register:
def __init__(self):
2024-06-19 06:53:25 +07:00
pass
2024-06-17 17:33:29 +07:00
def html(self, params):
APIADDR = "/register"
loggorilla.prcss(APIADDR, "Define page parameters")
2024-06-19 06:53:25 +07:00
active_page = "Register"
allowed_roles = [0]
roles = params["roles"]
loggorilla.prcss(APIADDR, "Account validation")
user_validation = procedure_validation.validation().account(APIADDR, allowed_roles)
user = user_validation['data']
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['profile']['roles'],
active_page = active_page
),
footer = Template(params["mako"]["website"]['footer']).render(
copyright = globalvar.copyright,
),
container = Template(params["mako"]["website"]['container']).render(
title = globalvar.title,
reCAPTCHA_client = globalvar.reCAPTCHA['client'],
roles = roles,
production = globalvar.production
2024-06-17 17:33:29 +07:00
)
)