django_youtube/views.py
def check_video_availability(request, video_id):
    """
    Controls the availability of the video. Newly uploaded videos are in processing stage.
    And others might be rejected.

    Returns:
        json response
    """
    # Check video availability
    # Available states are: processing
    api = Api()
    api.authenticate()
    availability = api.check_upload_status(video_id)

    if availability is not True:
        data = {'success': False}
    else:
        data = {'success': True}

    return HttpResponse(json.dumps(data), content_type="application/json")
def check_video_availability(request, video_id):
    """
    Controls the availability of the video. Newly uploaded videos are in processing stage.
    And others might be rejected.

    Returns:
        json response
    """
    # Check video availability
    # Available states are: processing
    api = Api()
    api.authenticate()
    availability = api.check_upload_status(video_id)

    if availability is not True:
        data = {'success': False}
    else:
        data = {'success': True}

    return HttpResponse(json.dumps(data), content_type="application/json")
Controls the availability of the video. Newly uploaded videos are in processing stage.
    And others might be rejected.

    Returns:
        json response