title: Get first object from Django queryset
body: <p>Given the following code:</p>
  
  <pre><code>randomItemQS = Item.objects.filter().exclude(id__in=[o.id for o in collection]).order_by('?')
  randomItem = randomItemQS[:1]
  calculation = randomItem.method() / constant
  </code></pre>
  
  <p>How can I ensure that <code>randomItem</code> is an <code>Item</code> and not a QuerySet?</p>
  
  <p>If I run the code from <code>manage.py shell</code>, then I get the expected result. However, running this code from a view results in the AttributeError <code>'QuerySet' object has no attribute 'method'</code>, and indicates that the error happens on the final line.</p>
  
  <p>What am I missing?</p>
  
  <p>EDIT: Sorry, I should be more specific -- I have this working just fine in the shell, but it's not working in the view. What would be different?</p>