title: Ordering a Django QuerySet after slicing it
body: <p>The <a href="https://docs.djangoproject.com/en/1.8/ref/models/querysets/#when-querysets-are-evaluated" rel="nofollow">Django docs</a> say:</p>
  
  <blockquote>
    <p>... even though slicing an unevaluated QuerySet returns another unevaluated QuerySet, modifying it further (e.g., adding more filters, or modifying ordering) is not allowed, since that does not translate well into SQL and it would not have a clear meaning either.</p>
  </blockquote>
  
  <p>From this I take it to mean that doing something like this:</p>
  
  <pre><code>q1 = Pizza.objects.all()[0:5]
  q2 = q1.order_by(...)
  </code></pre>
  
  <p>is not allowed. I have two question:</p>
  
  <ul>
  <li>why do the docs say this? I can understand that perhaps it doesn't translate into SQL well, but to me the "clear meaning" is that you get the first 5 pizza objects, then you order them by whatever criteria.</li>
  <li>what happens if you do this? I had been doing it for awhile, and the code was correct (but slow). Does it actually execute things in reverse -- order all the <code>Pizza</code> objects, then get the first 5?</li>
  </ul>