def METHOD_NAME(request):
    status = 200
    if request.method == "POST":
        status = redeem_reward_points(request)
    total_points_available = reward_points_of_user(request.user)
    reward_point_grantings = RewardPointGranting.objects.filter(user_profile=request.user)
    reward_point_redemptions = RewardPointRedemption.objects.filter(user_profile=request.user)
    events = RewardPointRedemptionEvent.objects.filter(redeem_end_date__gte=datetime.now()).order_by("date")
    reward_point_actions = []
    for granting in reward_point_grantings:
        reward_point_actions.append(
            (granting.granting_time, _("Reward for") + " " + granting.semester.name, granting.value, "")
        )
    for redemption in reward_point_redemptions:
        reward_point_actions.append((redemption.redemption_time, redemption.event.name, "", redemption.value))
    reward_point_actions.sort(key=lambda action: action[0], reverse=True)
    template_data = {
        "reward_point_actions": reward_point_actions,
        "total_points_available": total_points_available,
        "total_points_spent": sum(redemption.value for redemption in reward_point_redemptions),
        "events": events,
    }
    return render(request, "rewards_index.html", template_data, status=status)