def user_list(): user_dbs, more_cursor = util.retrieve_dbs( model.User.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order') or '-created', name=util.param('name'), admin=util.param('admin', bool), active=util.param('active', bool), permissions=util.param('permissions', list), ) if flask.request.path.startswith('/_s/'): return util.jsonify_model_dbs(user_dbs, more_cursor) 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, more_url=util.generate_more_url(more_cursor), has_json=True, permissions=sorted(set(permissions)), )
def user_list(): user_dbs, more_cursor = util.retrieve_dbs( model.User.query(), limit=util.param("limit", int), cursor=util.param("cursor"), order=util.param("order") or "-created", admin=util.param("admin", bool), active=util.param("active", bool), permissions=util.param("permissions", list), ) if flask.request.path.startswith("/_s/"): return util.jsonify_model_dbs(user_dbs, more_cursor) 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, more_url=util.generate_more_url(more_cursor), has_json=True, permissions=sorted(set(permissions)), )
def contact_list(): contact_dbs, more_cursor = util.retrieve_dbs(model.Contact.query(), limit=util.param('limit',int), cursor=util.param('cursor'), order=util.param('order') or 'name', ) return flask.render_template( 'contact_list.html', html_class='contact-list', title='Contact List', contact_dbs=contact_dbs, more_url = util.generate_more_url(more_cursor), )
def verse_list(): verse_dbs, more_cursor = util.retrieve_dbs( model.Verse.query(),# @UndefinedVariable limit=util.param('limit', 600), cursor=util.param('cursor'), order=util.param('order'), ) return flask.render_template( 'verse_list.html', html_class='verse-list', title='Verse List', verse_dbs=verse_dbs, more_url=util.generate_more_url(more_cursor), )
def exam_list(): exam_dbs, more_cursor = util.retrieve_dbs( model.Exam.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order') or 'name', ) return flask.render_template( 'exam_list.html', html_class='exam-list', title='Exam List', exam_dbs=exam_dbs, more_url=util.generate_more_url(more_cursor), )
def contact_list(): contact_dbs, more_cursor = util.retrieve_dbs( model.Contact.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order'), ) return flask.render_template( 'contact_list.html', html_class='contact-list', title='Contact List', contact_dbs=contact_dbs, more_url=util.generate_more_url(more_cursor), )
def verse_list(): verse_dbs, more_cursor = util.retrieve_dbs( model.Verse.query(), # @UndefinedVariable limit=util.param('limit', 600), cursor=util.param('cursor'), order=util.param('order'), ) return flask.render_template( 'verse_list.html', html_class='verse-list', title='Verse List', verse_dbs=verse_dbs, more_url=util.generate_more_url(more_cursor), )
def contact_list(): contact_dbs, more_cursor = util.retrieve_dbs( model.Contact.query(), limit=util.param("limit", int), cursor=util.param("cursor"), order=util.param("order") or "name", ) return flask.render_template( "contact_list.html", html_class="contact-list", title="Contact List", contact_dbs=contact_dbs, more_url=util.generate_more_url(more_cursor), )
def user_list(): user_dbs, more_cursor = model.User.get_dbs() if flask.request.path.startswith('/_s/'): return util.jsonify_model_dbs(user_dbs, more_cursor) 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, more_url=util.generate_more_url(more_cursor), has_json=True, permissions=sorted(set(permissions)), )
def index(): user_dbs, more_cursor = util.retrieve_dbs( User, User.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order'), name=util.param('name'), ) if request.path.startswith('/_json/'): return util.jsonify_model_dbs(user_dbs, more_cursor) return render_template( 'admin/user/index.html', title=u'Пользователи', user_dbs=user_dbs, more_url=util.generate_more_url(more_cursor) )
def resource_list(): resource_dbs, more_cursor = util.retrieve_dbs( model.Resource.query(), user_key=auth.current_user_key(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order') or '-created', ) if flask.request.path.startswith('/_s/'): return util.jsonify_model_dbs(resource_dbs, more_cursor) return flask.render_template( 'resource/resource_list.html', html_class='resource-list', title='Resource List', resource_dbs=resource_dbs, more_url=util.generate_more_url(more_cursor), )
def user_list(): user_dbs, more_cursor = util.retrieve_dbs( model.User.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order') or '-created', name=util.param('name'), admin=util.param('admin', bool), ) if flask.request.path.startswith('/_s/'): return util.jsonify_model_dbs(user_dbs, more_cursor) return flask.render_template( 'user_list.html', html_class='user', title='User List', user_dbs=user_dbs, more_url=util.generate_more_url(more_cursor), )
def user_list(): user_dbs, more_cursor = util.retrieve_dbs( model.User.query(), limit=util.param("limit", int), cursor=util.param("cursor"), order=util.param("order") or "-created", name=util.param("name"), admin=util.param("admin", bool), ) if flask.request.path.startswith("/_s/"): return util.jsonify_model_dbs(user_dbs, more_cursor) return flask.render_template( "user_list.html", html_class="user", title="User List", user_dbs=user_dbs, more_url=util.generate_more_url(more_cursor), )
def user_list(): user_dbs, more_cursor = util.retrieve_dbs( model.User.query(), limit=util.param('limit', int), cursor=util.param('cursor'), order=util.param('order') or '-created', name=util.param('name'), admin=util.param('admin', bool), ) if flask.request.path.startswith('/_s/'): return util.jsonify_model_dbs(user_dbs, more_cursor) return flask.render_template( 'user_list.html', html_class='user', title=_('User List'), user_dbs=user_dbs, more_url=util.generate_more_url(more_cursor), )