Here you already have ``user_profile`` in context, so you can use directly ``user_profile.display_name``.