テンプレートには次のロジックがあります。
{% 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 %}
これを行う方法はありますか?