title: How to check every single rows of Django database table for True or False values in a field and perform calculation based on it?
body: <p>I have a table in my Django app which has the following model class :-</p>
  
  <pre><code>  class LiveRoutes(models.Model):
         user = models.ForeignKey(User)
         route = models.ForeignKey(UserRoutes)
         status = models.ForeignKey(LiveRoutesStatus)
         traveller = models.ManyToManyField('LiveRouteTravellers')
         datetime = models.DateTimeField()
         calculated = models.NullBooleanField()
         def __unicode__(self):
           return self.route.__unicode__()
  </code></pre>
  
  <p>I want to define a function to perform calculations on the data of each row and after performing the calculation, I want to set the calculate value to False, so that I dont calculate it again. I am not sure how to achieve this? OR Whether it is possible to achieve?</p>
  
  <pre><code>       def CheckTheCalculateField(self):
           #code to check the value in calculate field of each row
  </code></pre>
  
  <p>Any help would be highly appreciated and thankfully received. </p>