import mysql.connector as mariadb from mako.template import Template from config import globalvar, database class register: def __init__(self): self.db_main = mariadb.connect(**database.db_main) self.cursor = self.db_main.cursor(dictionary=True) self.user_roles = [0] # Cari user roles disini def html(self, params): roles = params["roles"] active_page = "Register" 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 = self.user_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 ) )