diff -r 773ec80c8a28 -r a99dc223c583 schema.py --- a/schema.py Thu Mar 12 16:23:00 2009 +0100 +++ b/schema.py Thu Mar 12 16:23:31 2009 +0100 @@ -323,6 +323,12 @@ """return True if this entity type is used to build the schema""" return self.type in self.schema.schema_entity_types() + def has_format(self, attr): + """return true if this entity's schema has a format field for the given + attribute + """ + return self.has_subject_relation('%s_format' % attr) + def rich_text_fields(self): """return an iterator on (attribute, format attribute) of rich text field