{% load i18n %} {% with app=record.get_appliance %} {% if app %} {{ app.name }} {% else %} — {% endif %} {% endwith %}