def get(self): try: page_index = int(self.param('page')) except: page_index = 1 files = Media.all().order('-date') files, links = base.Pager(query=files, items_per_page=15).fetch(page_index) self.render2('views/admin/filemanager.html', { 'files': files, 'pager': links })
def get(self): try: page_index = int(self.param('page')) except: page_index = 1 authors = User.all().filter('isAuthor =', True) entries, pager = base.Pager(query=authors, items_per_page=15).fetch(page_index) self.render2('views/admin/authors.html', { 'current': 'authors', 'authors': authors, 'pager': pager })
def get(self, slug=None): try: page_index = int(self.param('page')) except: page_index = 1 cats = Category.allTops() entries, pager = base.Pager(query=cats, items_per_page=15).fetch(page_index) self.render2('views/admin/categories.html', { 'current': 'categories', 'cats': cats, 'pager': pager })
def get(self, slug='post'): try: page_index = int(self.param('page')) except: page_index = 1 entries = Entry.all().filter('entrytype =', slug).order('-date') entries, links = base.Pager(query=entries, items_per_page=15).fetch(page_index) self.render2('views/admin/' + slug + 's.html', { 'current': slug + 's', 'entries': entries, 'pager': links })
def get(self, slug=None): try: page_index = int(self.param('page')) except: page_index = 1 cq = self.param('cq') cv = self.param('cv') if cq and cv: query = Comment.all().filter(cq + ' =', cv).order('-date') else: query = Comment.all().order('-date') comments, pager = base.Pager(query=query, items_per_page=15).fetch(page_index) self.render2( 'views/admin/comments.html', { 'current': 'comments', 'comments': comments, 'pager': pager, 'cq': cq, 'cv': cv })