title: Display pages with specific tag in Django
body: <p>i'am using bootstrap Tab panes and i need to show posts with specific tag in each pane without reloading the page of course 
  for more detail i'm using Django with Wagtail CMS my app based on models file</p>
  
  <p><strong>EDIT</strong> : add tag dict to context </p>
  
  <p>models.py:</p>
  
  <pre><code>class BlogIndex(Page):
      intro = RichTextField(blank=True)
      def get_context(self, request):
        base_tags = ['foo','boo','voo']
        # Update context to include only published posts, ordered by reverse-chron
          context = super(BlogIndex, self).get_context(request)
          blogpages = self.get_children().live().order_by('-first_published_at')
          context['blogpages'] = blogpages
          context['base_tags'] = base_tags
          return context
  
  class BlogPageTag(TaggedItemBase):
      content_object = ParentalKey('BlogPage', related_name='tagged_items')
  
  class BlogPage(Page):
      #info
      tags = ClusterTaggableManager(through=BlogPageTag, blank=True)
      #contentpanel ....
  </code></pre>
  
  <p>note: i am using taggit but it seems that i didn't well handle it </p>
  
  <p>blog_index.html</p>
  
  <pre><code>&lt;div&gt;
    &lt;ul class="nav nav-tabs" role="tablist"&gt;
      {% for tag in base_tags %}
      &lt;li role="presentation" &gt;&lt;a href="#{{tag}}" aria-controls="{{tag}}" 
        role="tab" data-toggle="tab"&gt;{{tag}}&lt;/a&gt;&lt;/li&gt;
       {% ednfor %}
    &lt;/ul&gt;
  
    &lt;!-- Tab panes --&gt;
    &lt;div class="tab-content"&gt;
     {% for tag in base_tags %}
      &lt;div role="tabpanel" class="tab-pane" id="{{tag}}"&gt;
      #this is what i'am thinking of 
      #for posts in blogpages :
      # if post tag == "{{tag}}":
      # show post
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>