def get_marked_photos(self): """ Renders a list of marked files """ offset = self._get_from_query("page", 1) - 1 limit = self._get_from_query("limit", S.DEFAULT_PER_PAGE) photos = Photo.get_marked() num_photos = len(photos) start_index = (offset * limit) + 1 end_index = num_photos tokens = { "photos": photos, "offset": offset, "limit": limit, "start_index": start_index, "end_index": end_index, "num_photos": num_photos } return self.construct_response(Template.render("photos/mark.html", tokens))
def get_marked_photos(self): """ Renders a list of marked files """ offset = self._get_from_query("page", 1) - 1 limit = self._get_from_query("limit", S.DEFAULT_PER_PAGE) photos = Photo.get_marked() num_photos = len(photos) start_index = (offset * limit) + 1 end_index = num_photos tokens = { "photos": photos, "offset": offset, "limit": limit, "start_index": start_index, "end_index": end_index, "num_photos": num_photos } return self.construct_response( Template.render("photos/mark.html", tokens))