{% load helpers %} {% 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 }} {{ value.peer_type.model_class|meta:"verbose_name_plural" }} | {% else %}— | {% endif %}