X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2bf5eaca680da6ebd22e6fd799a9a5d68206f0b8..5116918efc22e206f68fa19529f93c913f98930f:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 57a4975ac..f1eeab739 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -31,7 +31,9 @@ from catalogue.tasks import touch_tag from pdcounter import models as pdcounter_models from pdcounter import views as pdcounter_views from suggest.forms import PublishingSuggestForm +from picture.models import Picture +from itertools import chain from os import path staff_required = user_passes_test(lambda user: user.is_staff) @@ -88,6 +90,7 @@ def differentiate_tags(request, tags, ambiguous_slugs): def tagged_object_list(request, tags=''): + # import pdb; pdb.set_trace() try: tags = models.Tag.get_tag_list(tags) except models.Tag.DoesNotExist: @@ -166,6 +169,9 @@ def tagged_object_list(request, tags=''): only_author = len(tags) == 1 and tags[0].category == 'author' objects = models.Book.objects.none() + # Add pictures + objects = Picture.tagged.with_all(tags)|objects + return object_list( request, objects,