(request)
return HttpResponse(json.dumps(data), content_type="application/json")
Get data for all saved TAXII polls. If is a POST and a TAXII message
    ID is provided, delete all content related to that poll before
    returning the list of polls. Should be an AJAX POST.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :returns: :class:`django.http.HttpResponse`
Get data for all saved TAXII polls. If is a POST and a TAXII message
    ID is provided, delete all content related to that poll before
    returning the list of polls. Should be an AJAX POST.
Get data for all saved TAXII polls . If is a POST and a TAXII message ID is provided delete all content related to that poll before returning the list of polls . Should be an AJAX POST .
def list_saved_polls(request):
    """
    Get data for all saved TAXII polls. If is a POST and a TAXII message
    ID is provided, delete all content related to that poll before
    returning the list of polls. Should be an AJAX POST.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :returns: :class:`django.http.HttpResponse`
    """
    if request.POST and request.body:
        polls = handlers.get_saved_polls('delete', request.body)
        data = {}
    else:
        polls = handlers.get_saved_polls('list')
        data = {'html': render_to_string("taxii_saved_polls.html",
                                         {'polls' : polls})}

    data['success'] = polls['success']
    data['msg'] = polls.get('msg')
    return HttpResponse(json.dumps(data), content_type="application/json")
def list_saved_polls ( request ) : if request . POST and request . body : polls = handlers . get_saved_polls ( 'delete' , request . body ) data = { } else : polls = handlers . get_saved_polls ( 'list' ) data = { 'html' : render_to_string ( "taxii_saved_polls.html" , { 'polls' : polls } ) } data [ 'success' ] = polls [ 'success' ] data [ 'msg' ] = polls . get ( 'msg' ) return HttpResponse ( json . dumps ( data ) , content_type = "application/json" )