本文整理汇总了Python中models.Conference.name方法的典型用法代码示例。如果您正苦于以下问题:Python Conference.name方法的具体用法?Python Conference.name怎么用?Python Conference.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Conference
的用法示例。
在下文中一共展示了Conference.name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post
# 需要导入模块: from models import Conference [as 别名]
# 或者: from models.Conference import name [as 别名]
def post(self, confid=''):
user = users.get_current_user()
if not user:
login_url = users.create_login_url('/')
self.redirect(login_url)
return
# check if the user is admin
if not users.is_current_user_admin():
self.response.out.write("You are not authorized")
return
# get conference
if not confid:
confid = self.request.get('id')
conference = Conference.get_by_id(confid)
if not conference:
conference = Conference(id=confid)
# update fields of the conference
conference.name = self.request.get('name')
conference.subtitle = self.request.get('subtitle')
conference.reviewers = self.request.get('reviewers').split()
# put the changes conference element
conference.put()
# redirect to the get page
self.redirect(self.request.url)