title: Can I avoid the use of a loop when only one item to iterate?
body: <p>I have a Django auction project (CS50 course assignment) and I have the following function in views.py:</p>
  <pre><code>def show_item(request, items):
  items = Listing.objects.filter(item = items)
  
  for item in items:
      ends = item.date + timedelta(days=7)
  return render(request, &quot;auctions/show_item.html&quot;,{
       &quot;items&quot;:items, &quot;ends&quot;: ends
      })
  </code></pre>
  <p>This allows me to display the item and its end date. My question is, since there is only one iteration in the loop (I'm showing a single item for auction on the template view), isn't there a cleaner way of doing</p>
  <p><code>ends = item.date + timedelta(days=7)</code> ?</p>
  <p>(i.e. just need to obtain the item date field in the model)
  Without the need of the for loop?
  I tried : <code>ends = items.date + timedelta(days=7)</code></p>
  <p>but get an error?</p>