(request, tid)
return resp
Given a particular TAXII poll or block, return an XML file containing
    the date from that TAXII poll or block.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param tid: ID of the desired TAXII poll (a datetimestamp), or block (oid)
    :param tid: string
    :returns: :class:`django.http.HttpResponse`
Given a particular TAXII poll or block, return an XML file containing
    the date from that TAXII poll or block.
Given a particular TAXII poll or block return an XML file containing the date from that TAXII poll or block .
def download_taxii_content(request, tid):
    """
    Given a particular TAXII poll or block, return an XML file containing
    the date from that TAXII poll or block.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param tid: ID of the desired TAXII poll (a datetimestamp), or block (oid)
    :param tid: string
    :returns: :class:`django.http.HttpResponse`
    """

    if '.' in tid: # this is a timestamp
        ret = handlers.get_saved_polls('download', tid)
    else: # this is an ObjectId
        ret = handlers.get_saved_block(tid)

    resp = HttpResponse(content_type='text/xml')
    resp['Content-Disposition'] = 'attachment; filename="%s"' % ret['filename']
    resp.write(ret['response'])

    return resp
def download_taxii_content ( request , tid ) : if '.' in tid : # this is a timestamp ret = handlers . get_saved_polls ( 'download' , tid ) else : # this is an ObjectId ret = handlers . get_saved_block ( tid ) resp = HttpResponse ( content_type = 'text/xml' ) resp [ 'Content-Disposition' ] = 'attachment; filename="%s"' % ret [ 'filename' ] resp . write ( ret [ 'response' ] ) return resp