def METHOD_NAME(request, user_slug):
    if user_slug == "me":
        return redirect("profile_badges", request.me.slug, permanent=False)
    user = get_object_or_404(User, slug=user_slug)
    if not user.can_view(request.me):
        return render(request, "auth/private_profile.html")
    badges = UserBadge.user_badges(user)
    return render(request, "users/profile/badges.html", {
        "user": user,
        "badges": paginate(request, badges, settings.PROFILE_BADGES_PAGE_SIZE),
    })