本文整理汇总了Python中model.user.User.get_user方法的典型用法代码示例。如果您正苦于以下问题:Python User.get_user方法的具体用法?Python User.get_user怎么用?Python User.get_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.user.User
的用法示例。
在下文中一共展示了User.get_user方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import get_user [as 别名]
def get(self, id=''):
obj = None
if id:
obj = User.get_user(id)
self.echo('admin_user_edit.html', {
'title': "编辑用户",
'method': "/admin/edit_user/" + id,
'obj': obj
}, layout='_layout_admin.html')
示例2: print
# 需要导入模块: from model.user import User [as 别名]
# 或者: from model.user.User import get_user [as 别名]
# -*-coding:utf-8-*-
__author__ = 'Administrator'
from model.base import DBSession
from model.nosql_data import JobData
from model.models import Job
from model.user import User
from config import Config
from lib import send_new_jobs_to_user,set_email_body,set_email_content
users_job_ids = JobData.get_user_job_ids(DBSession)
for user_id,job_ids in users_job_ids:
content = ""
print(job_ids.data)
for job_id in job_ids.data:
print(job_id)
job = Job.get_job_info_by_id(DBSession,job_id=job_id)
content =content + set_email_content(Config.send_job_address,job.id,job.content_rendered)
email_body = set_email_body(content)
send_new_jobs_to_user(email_body,User.get_user(DBSession,user_id).email)