Example #1
0
 def get_object(self, queryset=None):
     self.create_pagers(artwork_id=self.artwork_id)
     self.cover_list = CoverQuerys.all_covers_for_artwork(self.artwork)
     edition = self.query_cache.edition(
         edition_id=self.cover_list[0]['edition__pk'])
     print(f"Artwork: get_object artwork.name={self.artwork.name}")
     return edition
Example #2
0
    def test_cover_images(self):
        artist_list = CoverQuerys.artist_list()

        for artist in artist_list:
            artist_id = artist['artist_id']
            # print ("artist_id is {}".format(artist_id))
            the_artist = get_object_or_404(Artist, pk=artist_id)
            self.cover_images_exist(the_artist)
Example #3
0
 def get_object(self, queryset=None):
     edition = self.query_cache.edition(edition_id=self.edition_id)
     self.create_pagers(artwork_id=edition.theCover.artwork.pk)
     print(f"ArtworkEdition: get_object artwork.name={self.artwork.name}")
     self.cover_list = CoverQuerys.all_covers_for_artwork(self.artwork)
     #for cover in self.cover_list:
     #    print (f"{edition.theCover.artwork.confidence_level},{edition.theCover.artwork.get_confidence_level_display()}")
     return edition
Example #4
0
 def get_queryset(self):
     self.the_pager = self.create_top_level_pager(name=self.name)
     self.author = self.the_pager.get_entry()
     self.web_title = self.author.name
     print(f"AuthorSets:get_queryset: author is '{self.author.name}'")
     queryset = CoverQuerys.author_set_covers(
         author_id=self.author.author_id, return_dict=True)
     return queryset
Example #5
0
 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
Example #6
0
 def get_queryset(self):
     self.the_pager = self.create_top_level_pager(artist_id=self.artist_id,
                                                  name=self.name,
                                                  slug=self.slug)
     # get the artist to display
     self.artist = self.the_pager.get_entry()
     self.signature_exists()
     self.web_title = self.artist.name
     queryset = CoverQuerys.artist_cover_list(artist=self.artist)
     return queryset
Example #7
0
 def get_queryset(self):
     self.the_pager = self.create_top_level_pager(author_id=self.author_id,
                                                  name=self.name,
                                                  slug=self.slug)
     self.author = self.the_pager.get_entry()
     print(f"AuthorBooks:get_queryset: author is '{self.author.name}'")
     self.web_title = self.author.name
     queryset = CoverQuerys.all_covers_of_all_books_for_author(
         author=self.author, all=False)
     return queryset
Example #8
0
 def get_queryset(self):
     self.the_pager = self.create_top_level_pager(name=self.name)
     self.artist = self.the_pager.get_entry()
     # TODO pagers set objects but it is not obvious
     self.signature_exists()
     self.web_title = self.artist.name
     #print (f"ArtistSets:get_queryset: artist is '{self.artist.name}'")
     queryset = CoverQuerys.artist_set_covers(
         artist_id=self.artist.artist_id, return_dict=True)
     return queryset
Example #9
0
 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
Example #10
0
 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
Example #11
0
 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
Example #12
0
    def cover_images_exist(self, artist):
        cover_list = CoverQuerys.artist_cover_list(artist)
        for cover in cover_list:
            thumbnail = "".join([
                artist.cover_filepath, "Thumbnails/",
                cover['theCover__cover_filename']
            ])
            # print ("thumbnail is {}".format(thumbnail))
            absolute_image_filepath = self.get_absolute_path(thumbnail)
            self.image_exists(absolute_image_filepath)

            cover_image = "".join(
                [artist.cover_filepath, cover['theCover__cover_filename']])
            # print ("cover_image is {}".format(cover_image))
            absolute_image_filepath = self.get_absolute_path(cover_image)
            self.image_exists(absolute_image_filepath)
Example #13
0
 def set_list(self):
     set_list = CoverQuerys.author_set_list(author_id=self.author.pk)
     return set_list
Example #14
0
 def get_queryset(self):
     queryset = CoverQuerys.author_list()
     return queryset
Example #15
0
class Artbooks(ListView):
    model=Artbook
    template_name = 'bookcovers/artbooks.html'
    queryset = CoverQuerys.artbooks()
Example #16
0
 def get_queryset(self):
     queryset = CoverQuerys.artbook_index(self.artbook_id)
     return queryset
Example #17
0
 def setup(self, request, *args, **kwargs):
     super().setup(request, *args, **kwargs)
     self.artbook_id = kwargs.get("artbook_id", None)
     self.artbook = CoverQuerys.artbook(self.artbook_id)
Example #18
0
 def get_object(self, queryset=None):
     edition = self.query_cache.edition(edition_id=self.edition_id)
     self.create_pagers(book_id=edition.book.pk)
     # TODO create_pagers sets self.book but this is not obvious, make more explicit
     self.cover_list = CoverQuerys.all_covers_for_title(self.book)
     return edition
Example #19
0
 def get_queryset(self):
     self.create_pagers(book_id=self.book_id)
     print(f"Books: get_queryset book.title={self.book.title}")
     queryset = CoverQuerys.all_covers_for_title(self.book)
     return queryset
Example #20
0
 def get_queryset(self):
     queryset = CoverQuerys.artbooks_index_artbooks()
     return queryset
Example #21
0
 def get_queryset(self):
     queryset = CoverQuerys.print_history(self.print_run_id)
     return queryset
Example #22
0
 def get_queryset(self):
     queryset = CoverQuerys.panorama_list()
     return queryset
Example #23
0
 def get_queryset(self):
     self.create_pagers(artwork_id=self.artwork_id)
     print(f"ArtworkList: get_queryset artwork.name={self.artwork.name}")
     queryset = CoverQuerys.all_covers_for_artwork(self.artwork)
     return queryset
Example #24
0
 def get_queryset(self):
     queryset = CoverQuerys.artist_list()
     return queryset
Example #25
0
 def get_object(self, queryset=None):
     self.create_pagers(book_id=self.book_id)
     self.cover_list = CoverQuerys.all_covers_for_title(self.book)
     edition = self.query_cache.edition(
         edition_id=self.cover_list[0]['edition_id'])
     return edition
Example #26
0
 def set_list(self):
     set_list = CoverQuerys.artist_set_list(artist_id=self.artist.pk)
     return set_list