def adminHandler(self, request): dbs = ContentModel.all().fetch(limit=5) contents = [] for entry in dbs: contents.append({'id':entry.key().id(), 'title':entry.title, 'content':entry.content}) return self.renderTemplate('admin.html', contents=contents)
def indexHandler(self, request): mds = ContentModel.all().fetch(limit=5) entries = [{'id': ent.key().id()} for ent in mds] return self.renderTemplate('index.html', entries=entries)