How can I check if a field exists if it comes from a behavior?
For 'normal fields', I can do:
if field in getFields(schema)
Is there a 'similar way' ?
How can I check if a field exists if it comes from a behavior?
For 'normal fields', I can do:
if field in getFields(schema)
Is there a 'similar way' ?
from plone.dexterity.utils import iterSchemata
from zope.schema import getFieldsInOrder
for schema in iterSchemata(self.context):
print(' %s' % schema)
for field in getFieldsInOrder(schema):
print(' %s\t%s' % field)