def __init__(self, request, data=None, errors=None, success=True):
        """
        data is a map, errors a list
        """
        if not errors:
            errors = []
        if not data:
            data = {}
        json_resp = json_response(data=data, errors=errors, success=success)
        js = "{0}({1})".format(request.GET.get("jsonp", "jsonp_callback"), json_resp)
        super(JsonpResponse, self).__init__(js, mimetype='application/javascipt')
def __init__ ( self , request , data = None , errors = None , success = True ) : if not errors : errors = [ ] if not data : data = { } json_resp = json_response ( data = data , errors = errors , success = success ) js = "{0}({1})" . format ( request . GET . get ( "jsonp" , "jsonp_callback" ) , json_resp ) super ( JsonpResponse , self ) . __init__ ( js , mimetype = 'application/javascipt' )
data is a map, errors a list