title: Django paging with slicing
body: <p>I'm new to Django and Python and I'm trying to understand how to accomplish paging without getting all the records from a QuerySet first.  All the examples I've seen with QuerySets will get all the records first like below.</p>
  
  <pre><code>tickets = Ticket.objects.filter(site=site.id)    
  paginator = Paginator(tickets, settings.PAGE_SIZE)
  </code></pre>
  
  <p>This seems to make sense so that the Paginator will have a reference to how many pages it needs.  However, this seems inefficient to get all the records for each page request.  I know that QuerySets can be sliced to return a range of records.  </p>
  
  <p>How do I design my paging in order to only get the records pertinent for that page (slicing?), yet still have paging features?</p>
  
  <p><strong>Edit:</strong> Added template code that iterates.</p>
  
  <pre><code>  {% for ticket in tickets.object_list %}
          {{ ticket }}&lt;br/&gt;
     {% endfor %}
  </code></pre>