{# djlint:off H021 #}
Contact
{# djlint:on #}
{# "and" takes precedent: https://docs.djangoproject.com/en/4.2/ref/templates/builtins/#boolean-operators #}
{% if contact.name and "name" in wanted or contact.area_of_responsibility and "area_of_responsibility" in wanted %}
{% if contact.name and "name" in wanted %}
{{ contact.name }}
{% endif %}
{% if contact.name and "name" in wanted and contact.area_of_responsibility and "area_of_responsibility" in wanted %}
|
{% endif %}
{% if contact.area_of_responsibility and "area_of_responsibility" in wanted %}
{{ contact.area_of_responsibility }}
{% endif %}