I tried to document my MongoEngine application, but I am having problems documenting attributes in my Document classes.
I took the correct syntax to do the following:
class Asset(Document):
I tried every way to document these attributes that I found, and even added an attribute that is not a MongoEngine field to make sure this is not a problem:
class Asset(Document): """ The representation of a file uploaded into the data store. """
I tried various combinations of directives in the corresponding .rst file. At the moment, it looks like this:
.. currentmodule:: mymodule.asset .. autoclass:: Asset .. autoattribute:: Asset.foo .. autoattribute:: Asset.uri
The result is not very satisfactory: the foo attribute has no documentation at all, and in the uri field there is MongoEngine "Unicode string string". (StringField class documentation) as documentation. In addition, attribute documentation does not fit under the "class" (as with automodule +: members: - which displays all fields with MongoEngine descriptions)
Am I missing the Sphinx extension? Or am I twisting the syntax?
source share