[Fixed]-How reverse query ManytoMany Django

1👍

As schwobaseggl stated, remove the + sign and it should work as expected, using:

{% for element in task_filter.projects.all %}

From the Django Docs:

If you’d prefer Django not to create a backwards relation, set related_name to ‘+’ or end it with ‘+’. For example, this will ensure that the User model won’t have a backwards relation to this model:

Leave a comment