<ul>
{% for f in friends %}
   {% if f.first_name or f.last_name %}
   <li>{{ f.username }} ({{ f.first_name }} {{ f.last_name }})</li>
   {% else %}
   <li>{{ f.username }}</li>
   {% endif %}
{% endfor %}
</ul>
