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

    :param block_id: The ObjectID of the block
    :type block_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 block ID poll, update the "selected" field in the DB
    based on the value of the select parameter. Should be an AJAX GET.
Given a particular block ID poll update the selected field in the DB based on the value of the select parameter . Should be an AJAX GET .
def select_deselect_block(request, block_id, select):
    """
    Given a particular block ID poll, update the "selected" field in the DB
    based on the value of the select parameter. Should be an AJAX GET.

    :param block_id: The ObjectID of the block
    :type block_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([block_id])
    else:
        data = handlers.select_blocks([], [block_id])
    data = {'success': True}
    return HttpResponse(json.dumps(data), content_type="application/json")
def select_deselect_block ( request , block_id , select ) : if select in ( True , 1 , '1' ) : data = handlers . select_blocks ( [ block_id ] ) else : data = handlers . select_blocks ( [ ] , [ block_id ] ) data = { 'success' : True } return HttpResponse ( json . dumps ( data ) , content_type = "application/json" )