add 'omit' keyword to schema factory
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2714 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									5a1e67fe5c
								
							
						
					
					
						commit
						56f55f0277
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -66,7 +66,10 @@ class SchemaFactory(object):
 | 
			
		|||
    def __call__(self, interface, **kw):
 | 
			
		||||
        fieldMapping = self.fieldMapping
 | 
			
		||||
        fields = []
 | 
			
		||||
        omit = kw.pop('omit', [])
 | 
			
		||||
        for fname in schema.getFieldNamesInOrder(interface):
 | 
			
		||||
            if fname in omit:
 | 
			
		||||
                continue
 | 
			
		||||
            field = interface[fname]
 | 
			
		||||
            info = fieldMapping.get(field.__class__) or ('textline',)
 | 
			
		||||
            voc = (getattr(field, 'vocabulary', ()) or
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue