def METHOD_NAME(self, request, queryset):
    users = []
    for profile in UserProfile.objects.filter(user__in=queryset):
        profile.banned = True
        profile.save()
        users.append(profile.user.username)
    self.message_user(request, "Banned users: %s" % ", ".join(users))