title: Django: Model function is not returning proper value in template
body: <p>have the <code>bookingrecordsView</code> view in which I fetch all reservations made by a user. I added a model function <code>is_pending()</code> that fetches a reservation instance, checks whether the <code>date_to</code> field has passed or not, and returns a string. The view that fetches the reservations:</p>
  
  <pre><code>def bookingrecordsView(request):
       rsv = Reservation.objects.filter(user=request.user)
       return render(request, 'booking_history_page.html', {'rsv': rsv})
  </code></pre>
  
  <p>And the function that checks the date:</p>
  
  <pre><code>class Reservation (models.Model):
      user = models.ForeignKey(User, on_delete=models.CASCADE)
      date_from = models.DateField(auto_now=False, auto_now_add=False, blank=False)
      date_to = models.DateField(auto_now=False, auto_now_add=False, blank=False)
      time_from = models.TimeField(auto_now=False, auto_now_add=False, blank=False)
      time_to = models.TimeField(auto_now=False, auto_now_add=False, blank=False)
      destination=models.CharField(max_length=20, blank=False, verbose_name="Where will you go")
      chosen_vehicle=models.CharField(max_length = 20, blank=False, default='')
      booking_time=models.DateTimeField(default = datetime.now)
      garage = models.CharField(max_length = 20)
      city = models.CharField(max_length = 20, default='')
      area = models.CharField(max_length = 20, default='')
  
      @property
      Def is_pending(self):
          if self.date_to &lt; datetime.date.today():
               return "Pending"
          else:
              return "Over"`
  </code></pre>
  
  <p>This is my template snippet:</p>
  
  <pre><code>{% for r in rsv %}
       &lt;tr&gt;
           &lt;td&gt;{{ r.id }}&lt;/td&gt; 
           &lt;td&gt;{{ r.date_from }} - {{ r.date_to }}&lt;/td&gt;
           &lt;td&gt;{{ r.time_from }} - {{ r.time_to }}&lt;/td&gt;
           &lt;td&gt;{{ r.chosen_vehicle }}&lt;/td&gt;
           &lt;td&gt;{{ r.garage }}&lt;/td&gt;
           &lt;td&gt;{{ r.destination }}&lt;/td&gt;
           &lt;td&gt;{{ r.is_pending }}&lt;/td&gt;
        &lt;/tr&gt;
   {% endfor %}`
  </code></pre>
  
  <p>Now, for all the bookings, even those passed months earlier, this status is always returning 'Pending'.</p>
  
  <p>How do I get the correct return value for every <code>Reservation</code> instance from <code>is_pending()</code> function and pass it accordingly to the template?</p>