def get_my_profile(self, **kw): user_id = int(kw.get('user_id', '0')) template = TemplateEnv.get_template('get-profile.html') html_data = controller_admin.get_profile(user_id) user_data = controller_admin.get_userinfo() html_data['user_id'] = user_id html_data['user_name'] = user_data["user_name"] html_data['logo_name'] = user_data["logo_name"] html = template.render(html_data) return html
def my_profile(self, **kw): user_id = int(kw.get('user_id', '0')) universities = controller_admin.get_universtiy() provinces = controller_admin.get_province() majors = controller_admin.get_major() template = TemplateEnv.get_template('my-profile.html') html_data = controller_admin.get_profile(user_id) user_data = controller_admin.get_userinfo() html_data["universities"] = universities html_data["provinces"] = provinces html_data['majors'] = majors html_data['user_name'] = user_data["user_name"] html_data['logo_name'] = user_data["logo_name"] html = template.render(html_data) return html