title: Django & HTMX - after GET show only section of html template
body: <p>I want to create an instagram clone. I created a post.html which includes a post-card.html file for all posts and a post-filter.html to filter the posts.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!-- simple post.html view --&gt;
  &lt;div&gt;
    &lt;div&gt;
      {% include '_includes/bars/post-filter.html' %}
    &lt;/div&gt;
    &lt;div id=&quot;more-posts-wrapper&quot;&gt;
      {% for post in posts %}
        {% include '_includes/cards/post-card.html' %}
      {% endfor %}
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Now I added htmx to load more posts after clicking <code>load more button</code>. I tried to load the new posts after the existing one inside the div with <code>id=more-posts-wrapper</code>:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;
    &lt;div&gt;
      {% include '_includes/bars/post-filter.html' %}
    &lt;/div&gt;
    &lt;div hx-get=&quot;?page={{ page_obj.next_page_number }}&quot;
      hx-trigger=&quot;click&quot;
      hx-swap=&quot;innerHTML&quot;
      hx-target=&quot;#more-posts-wrapper&quot;&gt;
        &lt;p&gt;LOAD MORE&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id=&quot;more-posts-wrapper&quot;&gt;
      {% for post in posts %}
        {% include '_includes/cards/post-card.html' %}
      {% endfor %}
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Unfortunately, if I press the button, the correct reponse post gets delivered but <strong>the whole post.html document gets loaded</strong> after the div with <code>id=more-posts-wrapper</code>. I only want to load the <code>post-card.html</code> file and not reload the <code>post-filter.html</code> file.</p>
  <p>My views.py</p>
  <pre><code>class MemesView(ListView):
      model = Post
      template_name = 'memes.html'
      context_object_name = 'posts'
      paginate_by = 1
  </code></pre>
  <p>Does anyone know what I can do?</p>