Good morning, I need to display the values selected in the manytomany field named "sfide" in a table I will build with html, how can I do it? thanks
I also attach the image of the class "Profilo" with the ManyToMany field "sfide" enter image description here
I found the answer:
<table>
<tr>
<td>
<h4>Sfide Scelte</h4>
</td>
</tr>
{% for sfida in user.profile.sfide.all %}
<tr>
<td>{{ sfida.sfida }}</td>
</tr>
{% endfor %}
</table>