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


Python util.generate_next_url函数代码示例

本文整理汇总了Python中util.generate_next_url函数的典型用法代码示例。如果您正苦于以下问题:Python generate_next_url函数的具体用法?Python generate_next_url怎么用?Python generate_next_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了generate_next_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_response

def make_response(data, marshal_table, cursors=None):
	if util.is_iterable(data):
		response = {
			'status': 'success',
			'count': len(data),
			'now': datetime.utcnow().isoformat(),
			'result': map(lambda l: flask_restful.marshal(l, marshal_table), data),
		}
		if cursors:
			if isinstance(cursors, dict):
				if cursors.get('next'):
					response['next_cursor'] = cursors['next']
					response['next_url'] = util.generate_next_url(cursors['next'])
				if cursors.get('prev'):
					response['prev_cursor'] = cursors['prev']
					response['prev_url'] = util.generate_next_url(cursors['prev'])
			else:
				response['next_cursor'] = cursors
				response['next_url'] = util.generate_next_url(cursors)
		return util.jsonpify(response)
	return util.jsonpify({
		'status': 'success',
		'now': datetime.utcnow().isoformat(),
		'result': flask_restful.marshal(data, marshal_table),
	})
开发者ID:stretchhog,项目名称:prfit,代码行数:25,代码来源:helpers.py

示例2: user_list

def user_list():
  user_dbs, cursors = model.User.get_dbs(
      email=util.param('email'), prev_cursor=True,
    )
  permissions = list(UserUpdateForm._permission_choices)
  permissions += util.param('permissions', list) or []
  return flask.render_template(
      'user/user_list.html',
      html_class='user-list',
      title=_('User List'),
      user_dbs=user_dbs,
      next_url=util.generate_next_url(cursors['next']),
      prev_url=util.generate_next_url(cursors['prev']),
      api_url=flask.url_for('api.admin.user.list'),
      permissions=sorted(set(permissions)),
    )
开发者ID:mdxs,项目名称:gae-init-babel,代码行数:16,代码来源:user.py

示例3: member_list

def member_list():
  member_dbs, member_cursor = model.Member.get_dbs(order='joined_date')
  return flask.render_template(
      'member/member_list.html',
      html_class='member-list',
      title='Bio',
      member_dbs=member_dbs,
      next_url=util.generate_next_url(member_cursor),
    )
开发者ID:lipis,项目名称:the-smallest-creature,代码行数:9,代码来源:member.py

示例4: song_list

def song_list():
  song_dbs, song_cursor = model.Song.get_dbs(order='rank')
  return flask.render_template(
      'song/song_list.html',
      html_class='song-list',
      title='Songs & Lyrics',
      song_dbs=song_dbs,
      next_url=util.generate_next_url(song_cursor),
    )
开发者ID:lipis,项目名称:the-smallest-creature,代码行数:9,代码来源:song.py

示例5: person_list

def person_list():
  person_dbs, person_cursor = model.Person.get_dbs(user_key=auth.current_user_key())
  return flask.render_template(
    'person/person_list.html',
    html_class='person-list',
    title=u'People I’ve met',
    person_dbs=person_dbs,
    next_url=util.generate_next_url(person_cursor),
    api_url=flask.url_for('api.person.list'),
  )
开发者ID:lipis,项目名称:meet-notes,代码行数:10,代码来源:person.py

示例6: admin_pay_list

def admin_pay_list():
  pay_dbs, pay_cursor = model.Pay.get_dbs()

  return flask.render_template(
      'admin/pay_list.html',
      html_class='admin-pay-list',
      title='Pay List',
      pay_dbs=pay_dbs,
      next_url=util.generate_next_url(pay_cursor),
    )
开发者ID:georgekis,项目名称:salary,代码行数:10,代码来源:pay.py

示例7: project_list

def project_list():
  project_dbs, project_cursor = model.Project.get_dbs(user_key=auth.current_user_key())
  return flask.render_template(
    'project/project_list.html',
    html_class='project-list',
    title='Projects',
    project_dbs=project_dbs,
    next_url=util.generate_next_url(project_cursor),
    api_url=flask.url_for('api.project.list'),
  )
开发者ID:lipis,项目名称:electron-crash-reporter,代码行数:10,代码来源:project.py

示例8: pay_list

def pay_list():
  pay_dbs, pay_cursor = auth.current_user_db().get_pay_dbs()

  return flask.render_template(
      'pay/pay_list.html',
      html_class='pay-list',
      title='Pay List',
      pay_dbs=pay_dbs,
      next_url=util.generate_next_url(pay_cursor),
    )
开发者ID:georgekis,项目名称:salary,代码行数:10,代码来源:pay.py

示例9: resource_list

def resource_list():
  resource_dbs, resource_cursor = auth.current_user_db().get_resource_dbs()

  return flask.render_template(
    'resource/resource_list.html',
    html_class='resource-list',
    title='Resource List',
    resource_dbs=resource_dbs,
    next_url=util.generate_next_url(resource_cursor),
    api_url=flask.url_for('api.resource.list'),
  )
开发者ID:proudhon,项目名称:gae-init-upload,代码行数:11,代码来源:resource.py

示例10: user_list

def user_list():
  args = parser.parse({
    'email': wf.Str(missing=None),
    'permissions': wf.DelimitedList(wf.Str(), delimiter=',', missing=[]),
  })
  user_dbs, cursors = model.User.get_dbs(
    email=args['email'], prev_cursor=True,
  )
  permissions = list(UserUpdateForm._permission_choices)
  permissions += args['permissions']
  return flask.render_template(
    'user/user_list.html',
    html_class='user-list',
    title='User List',
    user_dbs=user_dbs,
    next_url=util.generate_next_url(cursors['next']),
    prev_url=util.generate_next_url(cursors['prev']),
    api_url=flask.url_for('api.admin.user.list'),
    permissions=sorted(set(permissions)),
  )
开发者ID:build-ed,项目名称:build-ed,代码行数:20,代码来源:user.py

示例11: admin_repo_list

def admin_repo_list():
  repo_dbs, repo_cursor = model.Repo.get_dbs(
      order=util.param('order') or '-modified',
    )
  return flask.render_template(
      'repo/admin_repo_list.html',
      html_class='admin-repo-list',
      title='Repo List',
      repo_dbs=repo_dbs,
      next_url=util.generate_next_url(repo_cursor),
      api_url=flask.url_for('api.admin.repo.list'),
    )
开发者ID:flyeven,项目名称:github-stats,代码行数:12,代码来源:repo.py

示例12: admin_member_list

def admin_member_list():
  member_dbs, member_cursor = model.Member.get_dbs(
      order=util.param('order') or '-modified',
    )
  return flask.render_template(
      'member/admin_member_list.html',
      html_class='admin-member-list',
      title='Member List',
      member_dbs=member_dbs,
      next_url=util.generate_next_url(member_cursor),
      api_url=flask.url_for('api.admin.member.list'),
    )
开发者ID:lipis,项目名称:the-smallest-creature,代码行数:12,代码来源:member.py

示例13: admin_account_list

def admin_account_list():
  account_dbs, account_cursor = model.Account.get_dbs(
      order=util.param('order') or '-modified',
    )
  return flask.render_template(
      'account/admin_account_list.html',
      html_class='admin-account-list',
      title='Account List',
      account_dbs=account_dbs,
      next_url=util.generate_next_url(account_cursor),
      api_url=flask.url_for('api.admin.account.list'),
    )
开发者ID:flyeven,项目名称:github-stats,代码行数:12,代码来源:account.py

示例14: admin_project_list

def admin_project_list():
  project_dbs, project_cursor = model.Project.get_dbs(
    order=util.param('order') or '-modified',
  )
  return flask.render_template(
    'project/admin_project_list.html',
    html_class='admin-project-list',
    title='Projects',
    project_dbs=project_dbs,
    next_url=util.generate_next_url(project_cursor),
    api_url=flask.url_for('api.admin.project.list'),
  )
开发者ID:lipis,项目名称:electron-crash-reporter,代码行数:12,代码来源:project.py

示例15: admin_song_list

def admin_song_list():
  song_dbs, song_cursor = model.Song.get_dbs(
      order=util.param('order') or '-modified',
    )
  return flask.render_template(
      'song/admin_song_list.html',
      html_class='admin-song-list',
      title='Song List',
      song_dbs=song_dbs,
      next_url=util.generate_next_url(song_cursor),
      api_url=flask.url_for('api.admin.song.list'),
    )
开发者ID:lipis,项目名称:the-smallest-creature,代码行数:12,代码来源:song.py


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