{% with relationships=object.get_relationships_data %} {% if relationships.source or relationships.destination %}
{{ value.label }} | {% if not value.has_many and value.value %}{{ value.value }} | {% elif value.has_many and value.queryset.count %}{{ value.queryset.count }} | {% else %}— | {% endif %}