title: Django/Wagtail/taggit - Getting model specific tag list
body: <p>I have seen this: </p>
  
  <p><a href="https://stackoverflow.com/questions/38061564/generating-a-unique-list-of-django-taggit-tags-in-wagtail">Generating a unique list of Django-Taggit Tags in Wagtail;</a></p>
  
  <p>and the solutions there have generated a list of all stored tags, i.e. image, document, etc tags.</p>
  
  <p>I am trying to accomplish a similar goal. On a News Index Page, have a dropdown of the News Page Tags. </p>
  
  <p>I can't seem to get a list of tags that are only News Page Tags, currently this gives me a list of all tags in my site, including image and document tags.</p>
  
  <pre><code>from django.template.response import TemplateResponse
  from modelcluster.fields import ParentalKey, ParentalManyToManyField
  from modelcluster.tags import ClusterTaggableManager
  from taggit.models import TaggedItemBase, Tag
  from core.models import Page
  
  class NewsPageTag(TaggedItemBase):
      content_object = ParentalKey('NewsPage', related_name='tagged_items')
  
  
  class NewsPage(Page):
      tags = ClusterTaggableManager(through=NewsPageTag, blank=True)
  
  
  class NewsIndexPage(Page):
  
      def serve(self, request, *args, **kwargs):
          context['tags'] = Tag.objects.all().distinct('taggit_taggeditem_items__tag')
          return TemplateResponse(
              request,
              self.get_template(request, *args, **kwargs),
              context
          )
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>from django.contrib.contenttypes.models import ContentType
  # ...
  def serve(self, request, *args, **kwargs):
      news_content_type = ContentType.objects.get_for_model(NewsPage)
      context['tags'] = Tag.objects.filter(
          taggit_taggeditem_items__content_type=news_content_type
      )
      return TemplateResponse(
          request,
          self.get_template(request, *args, **kwargs),
          context
      )
  </code></pre>
  
  <p>which assigns <code>context['tags']</code> an empty set</p>
  
  <p>My template:</p>
  
  <pre><code>{% if tags.all.count %}
      {% for tag in tags.all %}
          &lt;a class="dropdown-item" href="?tag={{ tag.id }}"&gt;{{ tag }}&lt;/a&gt;
      {% endfor %}
  {% endif %}
  </code></pre>
  
  <p>HELP! This feels like it shouldn't be so complicated. Thank you</p>