diff -r a7332a53e6dc -r 5fe8d5ffccde src/source/conf.py --- a/src/source/conf.py Mon Mar 26 10:38:06 2018 +0200 +++ b/src/source/conf.py Thu Apr 12 11:18:48 2018 +0200 @@ -17,8 +17,45 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import sys -# sys.path.insert(0, '/var/local/env/pycharm/lib/python3.5/site-packages') +import sys +#sys.path.insert(0, '/var/local/env/pycharm/lib/python3.5/site-packages') + +import os + +prefix_path = os.path.abspath('../../../') + os.path.sep +sys.path[0:0] = list(map(lambda x: prefix_path + x, + [ + 'pyams_alchemy/src', + 'pyams_cache/src', + 'pyams_catalog/src', + 'pyams_content/src', + 'pyams_content_es/src', + 'pyams_default_theme/src', + 'pyams_file/src', + 'pyams_form/src', + 'pyams_gis/src', + 'pyams_i18n/src', + 'pyams_ldap/src', + 'pyams_mail/src', + 'pyams_media/src', + 'pyams_notify/src', + 'pyams_notify_ws/src', + 'pyams_pagelet/src', + 'pyams_portal/src', + 'pyams_scheduler/src', + 'pyams_security/src', + 'pyams_sequence/src', + 'pyams_skin/src', + 'pyams_template/src', + 'pyams_thesaurus/src', + 'pyams_utils/src', + 'pyams_viewlet/src', + 'pyams_workflow/src', + 'pyams_zmi/src', + 'pyams_zmq/src', + 'pyams_zodbbrowser/src', + ]) + ) # -- General configuration ------------------------------------------------ @@ -31,6 +68,9 @@ # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.viewcode' ] # Add any paths that contain templates here, relative to this directory. @@ -181,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)