title: Django ListView customising queryset
body: <p>Hopefully this should be a simple one to help me with.</p>
  
  <p>I have a page with a dropdown menu containing three items:</p>
  
  <pre><code>&lt;form method="GET"&gt;
  
      &lt;select name="browse"&gt;
  
          &lt;option&gt;Cats&lt;/option&gt;
  
          &lt;option&gt;Dogs&lt;/option&gt;
  
          &lt;option&gt;Worms&lt;/option&gt;
  
      &lt;/select&gt;
  
   &lt;input type="submit" value="Submit" /&gt;
  
  &lt;/form&gt;
  
  &lt;!-- Output table --&gt;
  
    &lt;table id="myTable"&gt;
  
        &lt;thead&gt;
            &lt;tr&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Colour&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
  
        &lt;tbody&gt;
        {% for object in object_list %}
            &lt;tr&gt;
              &lt;td&gt;{{ object.name }}&lt;/td&gt;
              &lt;td&gt;{{ object.colour }}&lt;/td&gt;
            &lt;/tr&gt;
        {% endfor %}
        &lt;/tbody&gt;
  
    &lt;/table&gt;
  
  &lt;!-- Pagination controls --&gt;
  
  &lt;div class="pagination"&gt;
      &lt;span class="page-links"&gt;
          {% if page_obj.has_previous %}
              &lt;a href="?page={{ page_obj.previous_page_number }}"&gt;previous&lt;/a&gt;
          {% endif %}
          &lt;span class="page-current"&gt;
              Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
          &lt;/span&gt;
          {% if page_obj.has_next %}
              &lt;a href="?page={{ page_obj.next_page_number }}"&gt;next&lt;/a&gt;
          {% endif %}
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When the user selects an item and hits submit, they are given the results in a table as generated by the generic ListView:</p>
  
  <pre><code>class Browse(generic.ListView):
      template_name = 'app/browse.html'
      paginate_by = 25
  
      def get_queryset(self):
          queryset = Cats.objects.all()
          if self.request.GET.get("browse"):
              selection = self.request.GET.get("browse")
              if selection == "Cats":
                  queryset = Cats.objects.all()
              elif selection == "Dogs":
                  queryset = Dogs.objects.all()
              elif selection == "Worms":
                  queryset = Worms.objects.all()
              else:
                  queryset = Cats.objects.all()
          return queryset
  </code></pre>
  
  <p>However, when I attempt to turn a page using the pagination controls, the queryset resets to the first (default) item Cats, because (I think) the form data is reset.</p>
  
  <p>Any idea how to circumvent this problem?</p>
  
  <p>Thanks!</p>
  
  <p>PS: Oh, on that note, is it possible to set the queryset to none to begin with? Much obliged!</p>
  
  <p>UPDATE: When I use pagination on the Cats queryset it works fine so the bug is only displayed on the other two sets.</p>