src/source/conf.py
branchdev-dc
changeset 45 918d3c9b53ee
parent 37 e7207459c429
child 48 ca7d05086e67
equal deleted inserted replaced
41:9379f4e44a5a 45:918d3c9b53ee
   219 
   219 
   220 # A list of files that should not be packed into the epub file.
   220 # A list of files that should not be packed into the epub file.
   221 epub_exclude_files = ['search.html']
   221 epub_exclude_files = ['search.html']
   222 
   222 
   223 
   223 
       
   224 try:
       
   225     from zope.schema.fieldproperty import FieldProperty
       
   226 except ImportError:
       
   227     raise
       
   228 else:
       
   229     def get_field_doc(self):
       
   230         field = self._FieldProperty__field
       
   231         if field.title and field.description:
       
   232             return '{0}: {1}'.format(field.title, field.description)
       
   233         elif field.title:
       
   234             return field.title
       
   235         else:
       
   236             return super(self.__class__, self).__doc__
       
   237     FieldProperty.__doc__ = property(get_field_doc)