def METHOD_NAME(request):
    """Add or remove favorite video when the user click on star button."""
    if request.method == "POST":
        video = get_object_or_404(
            Video, pk=request.POST.get("video"), sites=get_current_site(request)
        )
        if video.is_draft:
            return False
        user_add_or_remove_favorite_video(request.user, video)
        return redirect(request.META["HTTP_REFERER"])
    else:
        raise Http404()