title: How do I use a dictionary to update fields in Django models?
body: <p>Suppose I have a model like this:</p>
  
  <pre><code>class Book(models.Model):
      num_pages = ...
      author = ...
      date = ...
  </code></pre>
  
  <p>Can I create a dictionary, and then insert or update the model using it?</p>
  
  <pre><code>d = {"num_pages":40, author:"Jack", date:"3324"}
  </code></pre>