[Fixed]-Tree view in django template

1👍

The global var’s name is task. But your local var is also called task.

{% for task in project.tasks.all %}
    {% include 'ProjectManager/views/task_view.html' with task=task%}
{%endfor%}

so i guess what you where trying to do is:

{% for task_local in project.tasks.all %}
    {% include 'ProjectManager/views/task_view.html' with task_global_of_next_inheritance=task_local%}
{%endfor%}

but what happened is

{% for task_local in project.tasks.all %}
    {% include 'ProjectManager/views/task_view.html' with task_global_of_next_inheritance=task_global%}
{%endfor%}

(using the global instead of the local var)
so you are just making the same call over and over again. if i am right, fix with

{% for task_local in project.tasks.all %}
    {% include 'ProjectManager/views/task_view.html' with task=task_local%}
{%endfor%}
👤ht_

Leave a comment