title: How can I update a Django models.DateTimeField when another, specific field in the same model is updated?
body: <p>I have two fields in a model here:</p>
  
  <pre><code>is_active = models.BooleanField(default=False)
  active_from = models.DateTimeField(blank=True)
  </code></pre>
  
  <p>When <code>is_active</code> is set to <code>True</code>, I'd like <code>active_from</code> to be updated to the current datetime.</p>
  
  <p>How do I go about doing this? I'm open to alternatives if there's a cleaner way of doing this with one field as well.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I'd like to contain this within the model to keep things encapsulated. This will be part of an API.</p>