def get(self): films = Film.all() if self.format == 'html': self.render('films.html', films=films, username=self.user.name) else: return self.render_json([film.as_dict() for film in films])
def get(self): films = Film.all() self.render('topfilms.html', films=films)