

def get_filters(self, request):
    _search = request.GET.get('_search')
    filters = None
    if (_search == 'true'):
        _filters = request.GET.get('filters')
        try:
            filters = (_filters and json.loads(_filters))
        except ValueError:
            return None
        if (filters is None):
            field = request.GET.get('searchField')
            op = request.GET.get('searchOper')
            data = request.GET.get('searchString')
            if all([field, op, data]):
                filters = {
                    'groupOp': 'AND',
                    'rules': [{
                        'op': op,
                        'field': field,
                        'data': data,
                    }],
                }
    return filters

dataset/ETHPy150Open gerry/django-jqgrid/jqgrid.py JqGrid.get_filters/original