{% if viewas.username != user.username %} You're viewing (read-only) data from {{ viewas.username }}. {% endif %}