1👍
✅
Given an instance of class Analiza, it will have a categories
many-to-many field manager attribute that you can reference in your template:
<ul>
{% for category in obj.categories.all %}
<li>{{ category }}</li>
{% endfor %}
</ul>
Or whatever – the point is that it’ll be an iterable returning instances of Category.
Source:stackexchange.com