当前位置: 首页>>代码示例>>Python>>正文


Python User.get_from_google_user方法代码示例

本文整理汇总了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)
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:9,代码来源:main.py

示例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'))
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:10,代码来源:main.py

示例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'))
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:10,代码来源:main.py

示例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'))
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:11,代码来源:main.py

示例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)
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:12,代码来源:main.py

示例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')
开发者ID:russorat,项目名称:savageautomation-tools,代码行数:7,代码来源:main.py


注:本文中的models.user.User.get_from_google_user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。