本文整理汇总了Python中models.UserData.properties方法的典型用法代码示例。如果您正苦于以下问题:Python UserData.properties方法的具体用法?Python UserData.properties怎么用?Python UserData.properties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.UserData
的用法示例。
在下文中一共展示了UserData.properties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from models import UserData [as 别名]
# 或者: from models.UserData import properties [as 别名]
def get(self):
current_email = self.request.get('curremail') #email that is currently used
new_email = self.request.get('newemail') #email the user wants to change to
swap = self.request.get('swap') #Are we changing emails?
currdata = UserData.get_from_user_input_email(current_email)
newdata = UserData.get_from_user_input_email(new_email)
if swap and currdata: #are we swapping? make sure account exists
currdata.current_user = users.User(new_email)
currdata.user_email = new_email
if newdata: #delete old account
currdata.user_id = newdata.user_id
newdata.delete()
currdata.put()
template_values = {'App' : App, 'curremail': current_email, 'newemail': new_email, 'currdata': currdata, 'newdata': newdata, "properties": UserData.properties()}
self.render_jinja2_template('devemailpanel.html', template_values)