Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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