selectors.py
changeset 4081 64548076add4
parent 4071 e19e586cc74e
child 4102 5ba6df5fcb07
equal deleted inserted replaced
4080:f88331eb374c 4081:64548076add4
   936 
   936 
   937 ## deprecated stuff ############################################################
   937 ## deprecated stuff ############################################################
   938 
   938 
   939 entity_implements = class_renamed('entity_implements', implements)
   939 entity_implements = class_renamed('entity_implements', implements)
   940 
   940 
   941 class but_etype(EntitySelector):
   941 class _but_etype(EntitySelector):
   942     """accept if the given entity types are not found in the result set.
   942     """accept if the given entity types are not found in the result set.
   943 
   943 
   944     See `EntitySelector` documentation for behaviour when row is not specified.
   944     See `EntitySelector` documentation for behaviour when row is not specified.
   945 
   945 
   946     :param *etypes: entity types (`basestring`) which should be refused
   946     :param *etypes: entity types (`basestring`) which should be refused
   952     def score(self, req, rset, row, col):
   952     def score(self, req, rset, row, col):
   953         if rset.description[row][col] in self.but_etypes:
   953         if rset.description[row][col] in self.but_etypes:
   954             return 0
   954             return 0
   955         return 1
   955         return 1
   956 
   956 
   957 but_etype = class_renamed('but_etype', but_etype, 'use ~implements(*etypes) instead')
   957 but_etype = class_renamed('but_etype', _but_etype, 'use ~implements(*etypes) instead')
   958 
       
   959