title: How do I know if django model instance was modified?
body: <p>I've got a code like that:</p>
  
  <pre><code># ...
  obj = Model.objects.get(pk=2342)
  if foo:
      obj.foo = 'bar'
  if bar:
      obj.bar = 'baz'
  obj.save()
  </code></pre>
  
  <p>Is there a good way to find out if the model instance was modified in order to prevent saving it each time the code runs?</p>