テンプレートには次のロジックがあります。
{% for task in tasks %}
{% ifchanged task.shared_task_id %}
<tr>{{ task }}</tr>
{% endifchanged %}
{% endfor %}
ifchanged
ただし、タグshared_task_id
が Noneの場合は無視したいと思います。何かのようなもの:
{% ifchanged task.shared_task_id or if task.shared_task_id == None %}
<tr>{{ task }}</tr>
{% endifchanged %}
これを行う方法はありますか?