title: How to create Model with nested object in Django
body: <p>I'm trying to create a small product manufacturing app with <strong>Django</strong>. There are two main <strong>models</strong> in the app.</p>
  <pre class="lang-py prettyprint-override"><code>class Product(models.Model):
      name = models.CharField(max_length=100, blank=True, default='')
  
  class ProductionOrder(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      entries = # not sure what goes here
  </code></pre>
  <p>I would like <code>ProductionOrder.entries</code> to be a list of dictionaries which include the <code>Product</code> and a <code>quantity</code> value.</p>
  <p>The created <code>ProductionOrder</code> would appear as so (not exactly sure :</p>
  <pre class="lang-py prettyprint-override"><code>productionOrder = {
     'id': 2, 
     'entries': [
        { 'product': 'product_1_ref', 'quantity': 10},
        { 'product': 'product_2_ref', 'quantity': 10}
     ]
  }
  </code></pre>
  <p>How can I accomplish this in a correct way?</p>