{% if d.item.image %} {{ d.item }} {% else %} {% with d.item.consist_item.first.rolling_stock as r %} {{ d.item }} {% endwith %} {% endif %}

{{ d.item }}

{% if d.item.tags.all %}

Tags: {% for t in d.item.tags.all %} {{ t.name }}{# new line is required #} {% endfor %}

{% endif %} {% if d.item.address %} {% endif %}
Consist
Address {{ d.item.address }}
Company {{ d.item.company }}
Era {{ d.item.era }}
Length {{ d.item.consist_item.count }}
Show all data {% if request.user.is_staff %}Edit{% endif %}