def get(self, id): tl = timeline.Timeline.get_by_id(int(id)) graph = timeline.generate_graph(tl) template_file = os.path.join(os.path.dirname(__file__), 'timeline.html') self.response.out.write(template.render(template_file, {'graph': graph, 'tl': tl}))
def get(self): results = timeline.Timeline.all().order('-submitted').fetch(limit=20) graphs = [{'id': tl.key().id(), 'url': timeline.generate_graph(tl, small=True)} for tl in results] template_file = os.path.join(os.path.dirname(__file__), 'main.html') self.response.out.write(template.render(template_file, {'graphs': graphs}))