コード例 #1
0
ファイル: controller.py プロジェクト: dongfangbupa/weiqiu
 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
コード例 #2
0
ファイル: controller.py プロジェクト: dongfangbupa/weiqiu
 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
コード例 #3
0
 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
コード例 #4
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
コード例 #5
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
コード例 #6
0
ファイル: controller.py プロジェクト: dongfangbupa/weiqiu
 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