title: Efficient way to update multiple fields of Django model object
body: <p>I'm trying to update user in Django database. </p>
  
  <p>Fetched data is as follows :</p>
  
  <pre><code>fetched_data = {
       'id': 1,
       'first_name': 'John',
       'last_name': 'Doe',
       'phone': '+32 12',
       'mobile_phone': '+32 13',
       'email': 'myemail@hotmail.com',
       'username': 'myusername'
  }
  </code></pre>
  
  <p>I get the user with this <strong>id</strong> as follows : </p>
  
  <pre><code>old_user = User.objects.get(pk=fetched_data['id'])
  </code></pre>
  
  <p>If I update the user as follows :</p>
  
  <pre><code>old_user.username = fetched_data['username']
  old_user.first_name = fetched_data['first_name']
  ......
  old_user.save()
  </code></pre>
  
  <p>it works fine, but I do not want to do it for every record, thus I tried something like :</p>
  
  <pre><code>for fetched_data_key in fetched_data:
      old_user.fetched_data_key = fetched_data['fetched_data_key']
      //old_user[fetched_data_key] = fetched_data['fetched_data_key'] --- I tried this way to
      old_user.save()
  </code></pre>
  
  <p>But that doesn't work. Any idea how can I update the user without doing it for every record?</p>