本文整理汇总了Python中handlers.person.Person类的典型用法代码示例。如果您正苦于以下问题:Python Person类的具体用法?Python Person怎么用?Python Person使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Person类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: notificationpermission
def notificationpermission():
person = Person()
pid = request.args(0)
way = request.args(1)
action = request.args(2)
person.notificationpermission(pid, way, action)
return person.context.button
示例2: board
def board():
auth = session.get("auth", {})
user = auth.get("user", None)
if user:
user_id = user.id
else:
user_id = None
person = Person()
person.board(request.args(0) or user_id or redirect(login_url))
return person.render('app/person/board')
示例3: board
def board():
auth = session.get("auth", {})
user = auth.get("user", None)
if user:
user_id = user.id
else:
user_id = None
person = Person()
person.context.leftlogo_enabled = True
person.board(request.args(0) or user_id or redirect(login_url), request.vars.postid)
return person.render()
示例4: check_availability
def check_availability():
person = Person()
items = dict(field=request.args(0),
value=request.args(1))
error = person.check_availability(items)
if error:
items['error'] = error[items['field']]
items['img'] = str(IMG(_title=items['error'], _class="%(field)s_availability_img" % items, _src=URL('static', person.context.theme_name, args=['images', 'icons', 'notright.24.png'])))
return "jQuery('.%(field)s_availability_img').hide();jQuery('#auth_user_%(field)s').css({'border': '1px solid red'});jQuery('#auth_user_%(field)s').parent().append('%(img)s');" % items
else:
items['img'] = str(IMG(_title=T("Available"), _class="%(field)s_availability_img" % items, _src=URL('static', person.context.theme_name, args=['images', 'icons', 'right.24.png'])))
return "jQuery('.%(field)s_availability_img').hide();jQuery('#auth_user_%(field)s').css({'border': '1px solid green'});jQuery('#auth_user_%(field)s').parent().append('%(img)s');" % items
示例5: show
def show():
auth = session.get("auth", {})
user = None
if auth:
user = auth.get("user", None)
if user:
user_id = user.id
else:
user_id = None
person = Person()
person.show(request.args(0) or user_id or redirect(login_url))
return person.render()
示例6: search
def search():
person = Person()
person.context.left_sidebar_enabled = True
person.search(request.vars.get('q'))
return person.render('app/person/search')
示例7: contacts
def contacts():
person = Person()
person.contacts(request.args(0))
person.context.left_sidebar_enabled = True
return person.render('app/person/contacts')
示例8: following
def following():
person = Person()
person.following(request.args(0))
return person.render()
示例9: privatetimeline
def privatetimeline():
person = Person('privatetimeline')
return person.render("app/person/privatetimeline")
示例10: usertimeline
def usertimeline():
person = Person('usertimeline')
person.context.leftlogo_enabled = True
return person.render("app/person/usertimeline")
示例11: usertimeline
def usertimeline():
person = Person('usertimeline')
return person.render("app/person/usertimeline")
示例12: removeevent
def removeevent():
person = Person()
person.removeevent(request.args(0), session.auth.user.id)
return person.context.eval
示例13: google
def google():
if 'state' in request.vars and request.vars.state == 'google':
session.state = request.vars.state
person = Person("google")
return person.render()
示例14: facebook
def facebook():
session.state = 'facebook'
person = Person("facebook")
return person.render()
示例15: facebook
def facebook():
person = Person("facebook")
return person.render()