def get_filter_dict(self):
        '''
        处理过滤字段 
        rows   一页显示多少行
        page   第几页, 1开始
        order  desc, asc      
        sort   指定排序的字段 order_by(sort)
        querydict 中的字段名和格式需要可以直接查询
        '''
        querydict = self.get_querydict()

        # post ,在cookie中设置了csrfmiddlewaretoken
        if querydict.has_key('csrfmiddlewaretoken'):
            querydict.pop('csrfmiddlewaretoken')

        try:
            page =  int(querydict.pop('page'))
            rows = int(querydict.pop('rows'))   
            setattr(self, 'easyui_page', page)
            setattr(self, 'easyui_rows', rows)
        except KeyError:
            setattr(self, 'easyui_page', None)
            setattr(self, 'easyui_rows', None)

        try:
            # order-> string  The default sort order, can only be 'asc' or 'desc' 
            # sort-> filed name
            # order_by('id')   order_by('-id')
            order = querydict.pop('order')
            sort = querydict.pop('sort')
            # order = 1
            # sort = 1
            if order == 'asc':
                setattr(self, 'easyui_order', sort)
            else:
                setattr(self, 'easyui_order', '-%s'% sort)

        except KeyError:
            setattr(self, 'easyui_order', None)

        # 过滤掉那些没有填写数据的input字段
        remove_key = []
        for key in querydict:
            if querydict[key] == '':
                remove_key.append(key)
        for key in remove_key:
            querydict.pop(key)

        return querydict
def get_filter_dict(self):
        '''
        处理过滤字段 
        rows   一页显示多少行
        page   第几页, 1开始
        order  desc, asc      
        sort   指定排序的字段 order_by(sort)
        querydict 中的字段名和格式需要可以直接查询
        '''
        querydict = self.get_querydict()

        # post ,在cookie中设置了csrfmiddlewaretoken
        if querydict.has_key('csrfmiddlewaretoken'):
            querydict.pop('csrfmiddlewaretoken')

        try:
            page =  int(querydict.pop('page'))
            rows = int(querydict.pop('rows'))   
            setattr(self, 'easyui_page', page)
            setattr(self, 'easyui_rows', rows)
        except KeyError:
            setattr(self, 'easyui_page', None)
            setattr(self, 'easyui_rows', None)

        try:
            # order-> string  The default sort order, can only be 'asc' or 'desc' 
            # sort-> filed name
            # order_by('id')   order_by('-id')
            order = querydict.pop('order')
            sort = querydict.pop('sort')
            # order = 1
            # sort = 1
            if order == 'asc':
                setattr(self, 'easyui_order', sort)
            else:
                setattr(self, 'easyui_order', '-%s'% sort)

        except KeyError:
            setattr(self, 'easyui_order', None)

        # 过滤掉那些没有填写数据的input字段
        remove_key = []
        for key in querydict:
            if querydict[key] == '':
                remove_key.append(key)
        for key in remove_key:
            querydict.pop(key)

        return querydict
def get_filter_dict ( self ) : querydict = self . get_querydict ( ) # post ,在cookie中设置了csrfmiddlewaretoken if querydict . has_key ( 'csrfmiddlewaretoken' ) : querydict . pop ( 'csrfmiddlewaretoken' ) try : page = int ( querydict . pop ( 'page' ) ) rows = int ( querydict . pop ( 'rows' ) ) setattr ( self , 'easyui_page' , page ) setattr ( self , 'easyui_rows' , rows ) except KeyError : setattr ( self , 'easyui_page' , None ) setattr ( self , 'easyui_rows' , None ) try : # order-> string  The default sort order, can only be 'asc' or 'desc'  # sort-> filed name # order_by('id')   order_by('-id') order = querydict . pop ( 'order' ) sort = querydict . pop ( 'sort' ) # order = 1 # sort = 1 if order == 'asc' : setattr ( self , 'easyui_order' , sort ) else : setattr ( self , 'easyui_order' , '-%s' % sort ) except KeyError : setattr ( self , 'easyui_order' , None ) # 过滤掉那些没有填写数据的input字段 remove_key = [ ] for key in querydict : if querydict [ key ] == '' : remove_key . append ( key ) for key in remove_key : querydict . pop ( key ) return querydict
处理过滤字段 
        rows   一页显示多少行
        page   第几页, 1开始
        order  desc, asc      
        sort   指定排序的字段 order_by(sort)
        querydict 中的字段名和格式需要可以直接查询
处理过滤字段 rows 一页显示多少行 page 第几页 1开始 order desc asc sort 指定排序的字段 order_by ( sort ) querydict 中的字段名和格式需要可以直接查询