schema.py
branchtls-sprint
changeset 1099 2353d1472094
parent 1090 a99dc223c583
child 1100 7ca89f4468e4
equal deleted inserted replaced
1098:739d4dce9b19 1099:2353d1472094
   323         """return True if this entity type is used to build the schema"""
   323         """return True if this entity type is used to build the schema"""
   324         return self.type in self.schema.schema_entity_types()
   324         return self.type in self.schema.schema_entity_types()
   325 
   325 
   326     def has_format(self, attr):
   326     def has_format(self, attr):
   327         """return true if this entity's schema has a format field for the given
   327         """return true if this entity's schema has a format field for the given
       
   328         attribute
       
   329         """
       
   330         return self.has_subject_relation('%s_format' % attr)
       
   331 
       
   332     def has_format(self, attr):
       
   333         """return true if this entity's schema has an encoding field for the given
   328         attribute
   334         attribute
   329         """
   335         """
   330         return self.has_subject_relation('%s_format' % attr)
   336         return self.has_subject_relation('%s_format' % attr)
   331 
   337 
   332     def rich_text_fields(self):
   338     def rich_text_fields(self):