title: Django object model - dynamically setting value
body: <p>How do I dynamically set the values of a Django object model by iterating through the parameters in the request GET.</p>
  
  <p>So get the field name and values from the request object and use that to iterate throw and update the Django model with the respective fields.</p>
  
  <pre><code>user = request.GET.get('user')
  name = request.GET.get('name')
  created = request.GET.get('created')
  modified = request.GET.get('modified')
  
  obj, created = Obj.objects.get_or_create(user=user, name=name)
  
  if created:
  
      obj.created = created
      obj.modified = modified
  
      obj.save(update_fields=['created', 'modified'])
  </code></pre>