schema.py
branchtls-sprint
changeset 1099 2353d1472094
parent 1090 a99dc223c583
child 1100 7ca89f4468e4
--- a/schema.py	Thu Mar 12 18:40:24 2009 +0100
+++ b/schema.py	Thu Mar 12 18:40:56 2009 +0100
@@ -329,6 +329,12 @@
         """
         return self.has_subject_relation('%s_format' % attr)
 
+    def has_format(self, attr):
+        """return true if this entity's schema has an encoding 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