[Answer]-How getting ManyToManyField("self") in the template?

1👍

It works the same way:

{% for sequel in film.sequels.all %}{{ sequel.titolo }}{% endfor %}

If there aren’t any sequels, use {% empty %}

{% for sequel in film.sequels.all %}
   {{ sequel.titolo }}
{% empty %}
   <p>No sequels</p>
{% endfor %}

Leave a comment