title: How to set ForeignKey attribute knowing just the attribute name and related object's ID?
body: <p>Is there a way to set <code>ForeignKey</code> attribute value knowing just the name of the attribute and the <code>ID</code> of the <code>ForeignKey</code> related object?</p>
  <p>I tried to do this using <code>setattr()</code>:</p>
  <pre><code>setattr(instance, 'product', 41)
  </code></pre>
  <p>The result is:</p>
  <pre><code>Cannot assign &quot;41&quot;: &quot;MyModel.product&quot; must be a &quot;Product&quot; instance. 
  </code></pre>