Added function to automatically extract documentation from interface field properties
--- a/src/source/conf.py Mon Apr 09 17:40:10 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)