merge default doc-dc
authorDamien Correia
Thu, 12 Apr 2018 11:44:17 +0200
branchdoc-dc
changeset 47 5ca671ff6836
parent 44 915602c1fb3a (current diff)
parent 46 5fe8d5ffccde (diff)
child 48 ca7d05086e67
merge default
--- a/src/source/conf.py	Mon Apr 09 17:40:10 2018 +0200
+++ b/src/source/conf.py	Thu Apr 12 11:44:17 2018 +0200
@@ -221,3 +221,17 @@
 epub_exclude_files = ['search.html']
 
 
+try:
+    from zope.schema.fieldproperty import FieldProperty
+except ImportError:
+    raise
+else:
+    def get_field_doc(self):
+        field = self._FieldProperty__field
+        if field.title and field.description:
+            return '{0}: {1}'.format(field.title, field.description)
+        elif field.title:
+            return field.title
+        else:
+            return super(self.__class__, self).__doc__
+    FieldProperty.__doc__ = property(get_field_doc)