def items(self):
        # Tagging is optional. When it's not used, it's ignored.
        if 'taggit' not in settings.INSTALLED_APPS:
            return []

        from taggit.models import Tag
        only_instances = EntryModel.objects.published().only('pk')

        # Until https://github.com/alex/django-taggit/pull/86 is merged,
        # better use the field names directly instead of bulk_lookup_kwargs
        return Tag.objects.filter(
            taggit_taggeditem_items__object_id__in=only_instances,
            taggit_taggeditem_items__content_type=ContentType.objects.get_for_model(EntryModel)
        )
dataset/ETHPy150Open edoburu/django-fluent-blogs/fluent_blogs/sitemaps.py/TagArchiveSitemap.items/original