src/source/conf.py
branchdev-dc
changeset 45 918d3c9b53ee
parent 37 e7207459c429
child 48 ca7d05086e67
--- a/src/source/conf.py	Mon Apr 09 15:17:51 2018 +0200
+++ b/src/source/conf.py	Thu Apr 12 11:11:15 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)