{% if user.is_superuser %} {% with object.get_admin_url as admin_url %} {% if admin_url %} {% endif %} {% endwith %} {% endif %}