title: How to use an atribbute of an object Many To Many?
body: <p>I'm using Django 2.1</p>
  
  <p>I've got these 2 <code>models</code> with a <code>ManyToMany</code> relationship:</p>
  
  <pre><code>class Ingrediente(models.Model):
  produtor = models.ForeignKey('auth.User', on_delete=models.CASCADE, default=10)
  nome = models.CharField(max_length=200)
  descricao = models.TextField()
  quantidade = models.DecimalField(max_digits=10, decimal_places=3)
  custo = models.DecimalField(max_digits=10, decimal_places=2)
  
  def __str__(self):
      return self.nome
  </code></pre>
  
  <p>e</p>
  
  <pre><code>class Produto(models.Model):
  nome = models.CharField(max_length=200)
  descricao = models.TextField()
  ingredientes = models.ManyToManyField(Ingrediente)
  utilitarios = models.ManyToManyField(OutrosCustos)
  
  def __str__(self):
      return self.nome
  </code></pre>
  
  <p>I use the this <code>view</code> to return a list with all objects of Class Produto:</p>
  
  <pre><code>def produtos_list(request):
  produtos = Produto.objects.filter()
  return render(request, 'egg_app/produtos_list.html', {'produtos':produtos})
  </code></pre>
  
  <p>And in my template I write this:</p>
  
  <pre><code>&lt;table class="table"&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th scope="col"&gt;Nº Produto&lt;/th&gt;
          &lt;th scope="col"&gt;Nome&lt;/th&gt;
          &lt;th scope="col"&gt;Ingredientes&lt;/th&gt;
          &lt;th scope="col"&gt;Custo&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      {% for p in produtos %}
          &lt;tr&gt;
              &lt;th scope="row"&gt;{{ p.pk }}&lt;/th&gt;
              &lt;td&gt;{{ p.nome }}&lt;/td&gt;
              &lt;td&gt;{{ p.ingredientes }}&lt;/td&gt;
              &lt;td&gt;custo teste&lt;/td&gt;
          &lt;/tr&gt;
      {% endfor %}
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>But my result in the column <code>Ingredientes</code> has been <code>egg_app.Ingrediente.None</code> and not the name of the Ingrediente of the relationship (between <code>Ingrediente</code> and <code>Produto</code>). In my Django admin page, I associate this, so I'm sure about the relationship.</p>