django_echarts/utils/interfaces.py
def as_parameters(*parameters, variables=None):
        """
        Dump python list as the parameter of javascript function
        :param parameters:
        :param variables:
        :return:
        """
        s = json.dumps(parameters)
        s = s[1:-1]
        if variables:
            for v in variables:
                if v in parameters:
                    s = s.replace('"' + v + '"', v)
        return s
def as_parameters(*parameters, variables=None):
        """
        Dump python list as the parameter of javascript function
        :param parameters:
        :param variables:
        :return:
        """
        s = json.dumps(parameters)
        s = s[1:-1]
        if variables:
            for v in variables:
                if v in parameters:
                    s = s.replace('"' + v + '"', v)
        return s
def as_parameters ( * parameters , variables = None ) : s = json . dumps ( parameters ) s = s [ 1 : - 1 ] if variables : for v in variables : if v in parameters : s = s . replace ( '"' + v + '"' , v ) return s
Dump python list as the parameter of javascript function
        :param parameters:
        :param variables:
        :return:
Dump python list as the parameter of javascript function : param parameters : : param variables : : return :