def get(self): stories=Story.all().order('-timestamp').fetch(1000, offset=0) for story in stories: story.delete() videos=Video.all().order('-timestamp').fetch(1000, offset=0) for video in videos: video.delete()
def get(self): stories=[] for s in Story.all().order('-timestamp').fetch(100): stories.append(s) template_values = { "stories":stories } path = os.path.join(os.path.dirname(__file__), '../html/article.html') shared.render(self, path, template_values)
def get(self): stories=[] for s in Story.all().order('-timestamp').fetch(100): stories.append(s) videos=[] for v in Video.all().order('-timestamp').fetch(100): videos.append(v) template_values = { "stories":stories, "videos":videos } path = os.path.join(os.path.dirname(__file__), '../html/index.html') shared.render(self, path, template_values)
def get(self): stories=Story.all().fetch(1000) GTrendCron.doCron(stories) videos=Video.all().fetch(1000) YTrendCron.doCron(videos)