本文整理汇总了Python中model.User.User.get方法的典型用法代码示例。如果您正苦于以下问题:Python User.get方法的具体用法?Python User.get怎么用?Python User.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model.User.User
的用法示例。
在下文中一共展示了User.get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from model.User import User [as 别名]
# 或者: from model.User.User import get [as 别名]
def get(self,jirgaId):
loggedIn= False
user = self.getuser()
if(user is not None):
jirga = Jirga.all().filter('jirgaId', jirgaId).get()
public = jirga.publicJirga
if(public == 0):
#private jirga
template_params = {
'public':public,
}
else:
#public
if(user in jirga.members):
#user is a member
member = 1
else:
#user is not a member
member = 0
template_params = {
'public':public,
'member':member
}
member = User.get(jirga.members)
obj2={'members':member}
template_params.update(obj2)
template_params.update({'user':user})
template_params.update({'jirga':jirga})
render_template(self,"jirgaSettings.html",template_params)
else:
self.response.write("FAIL - you need to be logged in for this")