本文整理汇总了Python中models.user.User.get_from_google_user方法的典型用法代码示例。如果您正苦于以下问题:Python User.get_from_google_user方法的具体用法?Python User.get_from_google_user怎么用?Python User.get_from_google_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.user.User
的用法示例。
在下文中一共展示了User.get_from_google_user方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: url_checker_dashboard
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def url_checker_dashboard():
if not g.user:
return redirect(url_for('main'))
user = User.get_from_google_user(g.user)
batches = UrlBatch.query_all(user.auth_token)
show = request.args.get('show')
return render_template('url-checker-dash.html',batches=batches['data'],show=show)
示例2: validate_signature
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def validate_signature():
token = request.args.get('token')
signature = request.args.get('signature')
user = User.get_from_google_user(g.user)
user.initialize(g.user)
user.put()
flash('Regenerated your credentials.')
return redirect(url_for('members'))
示例3: regenerate
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def regenerate():
if not g.user:
return redirect(url_for('main'))
user = User.get_from_google_user(g.user)
user.initialize(g.user)
user.put()
flash('Regenerated your credentials.')
return redirect(url_for('members'))
示例4: get_batch_details
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def get_batch_details():
if not g.user:
return redirect(url_for('main'))
user = User.get_from_google_user(g.user)
batch_name = request.args.get('batch_name')
if batch_name:
details = UrlBatch.get_batch_details(user.auth_token,batch_name)
return render_template('url-checker-details.html',details=details)
return redirect(url_for('url_checker_dashboard'))
示例5: members
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def members():
if not g.user:
return redirect(url_for('main'))
user = User.get_from_google_user(g.user)
if not user:
user = User()
user.initialize(g.user)
user.put()
flash('Created a new user')
return render_template('members.html',user=user)
示例6: install_url_tracking
# 需要导入模块: from models.user import User [as 别名]
# 或者: from models.user.User import get_from_google_user [as 别名]
def install_url_tracking():
if not g.user:
return redirect(url_for('main'))
user = User.get_from_google_user(g.user)
return render_template('url-checker-install.html')