title: How to automatically change model fields in django
body: <p>I have a model and I want to know if it is possible to set a condition that triggers a change in the model field. For example, I have a model</p>
  
  <pre><code>class BillboardTracker(models.Model):
      client_name = models.CharField(max_length=400)
      entry_date = models.DateTimeField(default=datetime.now)
      duration = models.PositiveIntegerField()
      expiry_date = models.DateField()
      is_expired = models.BooleanField(default=False)
  </code></pre>
  
  <p>I want to know if it is possible to have a function in the model that makes is_expired equals to True when the expiry date is up. I tried this </p>
  
  <pre><code>def expire(self):
       if datetime.now == self.expiry_date:
          self.is_expired = True
  </code></pre>
  
  <p>but it's not working. Is it possible to implement this?</p>