def get_universities(self, **kw): print '~~~~', kw template = TemplateEnv.get_template('tmp-university.html') user_data = controller_admin.get_userinfo() universities = controller_admin.get_universtiy(provinces_id=kw.get('provinces_id')) html = template.render({"universities": universities, "user_name": user_data["user_name"], "logo_name": user_data["logo_name"]}) return html
def database2(self): template = TemplateEnv.get_template('database2.html') universities = controller_admin.get_universtiy() provinces = controller_admin.get_province() majors = controller_admin.get_major() user_data = controller_admin.get_userinfo() html = template.render({"universities": universities, "provinces": provinces, "majors": majors, "user_name": user_data["user_name"], "logo_name": user_data["logo_name"]}) return html
def get_universities(self, **kw): print '~~~~', kw template = TemplateEnv.get_template('tmp-university.html') user_data = controller_admin.get_userinfo() universities = controller_admin.get_universtiy( provinces_id=kw.get('provinces_id')) html = template.render({ "universities": universities, "user_name": user_data["user_name"], "logo_name": user_data["logo_name"] }) return html
def database2(self): template = TemplateEnv.get_template('database2.html') universities = controller_admin.get_universtiy() provinces = controller_admin.get_province() majors = controller_admin.get_major() user_data = controller_admin.get_userinfo() html = template.render({ "universities": universities, "provinces": provinces, "majors": majors, "user_name": user_data["user_name"], "logo_name": user_data["logo_name"] }) 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