(request, poll_id, select)
return HttpResponse(json.dumps(data), content_type="application/json")
Given a particular poll ID, update the "selected" field of the associated
    blocks in the DB based on the value of the select parameter.
    Should be an AJAX GET.

    :param poll_id: The Poll ID of blocks to be modified
    :type poll_id: str
    :param select: True or 1 to select, False or 0 to deselect
    :param select: int or bool
    :returns: :class:`django.http.HttpResponse`
Given a particular poll ID, update the "selected" field of the associated
    blocks in the DB based on the value of the select parameter.
    Should be an AJAX GET.
Given a particular poll ID update the selected field of the associated blocks in the DB based on the value of the select parameter . Should be an AJAX GET .
def select_deselect_all(request, poll_id, select):
    """
    Given a particular poll ID, update the "selected" field of the associated
    blocks in the DB based on the value of the select parameter.
    Should be an AJAX GET.

    :param poll_id: The Poll ID of blocks to be modified
    :type poll_id: str
    :param select: True or 1 to select, False or 0 to deselect
    :param select: int or bool
    :returns: :class:`django.http.HttpResponse`
    """
    if select in (True, 1, '1'):
        data = handlers.select_blocks(poll_id, [])
    else:
        data = handlers.select_blocks([], poll_id)
    data = {'success': True}
    return HttpResponse(json.dumps(data), content_type="application/json")
def select_deselect_all ( request , poll_id , select ) : if select in ( True , 1 , '1' ) : data = handlers . select_blocks ( poll_id , [ ] ) else : data = handlers . select_blocks ( [ ] , poll_id ) data = { 'success' : True } return HttpResponse ( json . dumps ( data ) , content_type = "application/json" )