def get_object(self, queryset=None): edition = self.query_cache.edition(edition_id=self.edition_id) set, self.cover_list = CoverQuerys.author_artist_set_cover_list( author_id=edition.book.author_id, artist_id=edition.theCover.artwork.artist_id) self.set_pager = self.create_set_pager(set_id=set.pk) self.the_pager = self.create_top_level_pager( artist_id=edition.theCover.artwork.artist_id) self.edition = edition return edition
def get_queryset(self): self.set_pager = self.create_set_pager(set_id=self.set_id) # TODO create_set_pager sets self.set but this is not obvious, make more explicit set, queryset = CoverQuerys.author_artist_set_cover_list( set_id=self.set.pk) edition = self.query_cache.edition( edition_id=queryset[0]['edition_id']) self.the_pager = self.create_top_level_pager( author_id=edition.book.author_id) self.edition = edition return queryset
def get_object(self, queryset=None): self.set_pager = self.create_set_pager(set_id=self.set_id) # TODO create_set_pager sets self.set but this is not obvious, make more explicit set, self.cover_list = CoverQuerys.author_artist_set_cover_list( set_id=self.set.pk) edition = self.query_cache.edition( edition_id=self.cover_list[0]['edition_id']) self.the_pager = self.create_top_level_pager( artist_id=edition.theCover.artwork.artist_id) self.edition = edition return edition
def get_queryset(self): edition = self.query_cache.edition(edition_id=self.edition_id) print( f"SetEditions:get_object author id is '{edition.book.author_id}'") print( f"SetEditions:get_object artist id is '{edition.theCover.artwork.artist_id}'" ) set, queryset = CoverQuerys.author_artist_set_cover_list( author_id=edition.book.author_id, artist_id=edition.theCover.artwork.artist_id) self.the_pager = self.create_top_level_pager( author_id=edition.book.author_id) self.book = edition.book self.set_pager = self.create_set_pager(set_id=set.pk) return queryset