def get(self): try: page = int(request.args.get('page', 1)) except ValueError: page = 1 skip = app.config['NUMBER_OF_ITEMS_PER_PAGE'] * (page - 1) allgroups = self.get_pagedGroups(skip, app.config['NUMBER_OF_ITEMS_PER_PAGE']) pagination = Pagination(css_framework='bootstrap3', page=page, total=common.countGroups(), record_name='group', per_page= app.config['NUMBER_OF_ITEMS_PER_PAGE']) return flask.render_template('getgroup.html', allgroups=allgroups, pagination=pagination)
def get_searchGroups(self, groupname): try: page = int(request.args.get('page', 1)) except ValueError: page = 1 skip = app.config['NUMBER_OF_ITEMS_PER_PAGE'] * (page - 1) getallgroups = GetAllGroups() searchgroups = getallgroups.get_pagedGroups(skip, app.config['NUMBER_OF_ITEMS_PER_PAGE'], groupname) pagination = Pagination(page=page, total=common.countGroups(groupname), found=groupname, record_name='group', per_page= app.config['NUMBER_OF_ITEMS_PER_PAGE']) return flask.render_template('getgroup.html', allgroups=searchgroups, pagination=pagination)
def get(self): try: page = int(request.args.get('page', 1)) except ValueError: page = 1 skip = app.config['NUMBER_OF_ITEMS_PER_PAGE'] * (page - 1) allgroups = self.get_pagedGroups( skip, app.config['NUMBER_OF_ITEMS_PER_PAGE']) pagination = Pagination( css_framework='bootstrap3', page=page, total=common.countGroups(), record_name='group', per_page=app.config['NUMBER_OF_ITEMS_PER_PAGE']) return flask.render_template('getgroup.html', allgroups=allgroups, pagination=pagination)
def get_searchGroups(self, groupname): try: page = int(request.args.get('page', 1)) except ValueError: page = 1 skip = app.config['NUMBER_OF_ITEMS_PER_PAGE'] * (page - 1) getallgroups = GetAllGroups() searchgroups = getallgroups.get_pagedGroups( skip, app.config['NUMBER_OF_ITEMS_PER_PAGE'], groupname) pagination = Pagination( page=page, total=common.countGroups(groupname), found=groupname, record_name='group', per_page=app.config['NUMBER_OF_ITEMS_PER_PAGE']) return flask.render_template('getgroup.html', allgroups=searchgroups, pagination=pagination)