Self-portrait Sphinx doesn't want to import translation

I have a latent suspicion that Sphinx doesn't like my Translation class. When I try to do automethod:

.. automethod:: translations.models.Translation.new

      

I am getting this warning:

/Users/dash/Projects/zamboni/zamboni/docs/topics/translations.rst:39: 
(WARNING/2) autodoc can't import/find method 
'translations.models.Translation.new', it reported error: "cannot import name
Translation", please check your spelling and sys.path

      

Path and more. I tried to import the translation directly into conf.py and had similar problems. I still had problems when I tried something like:

from translations.models import Translation as t

It was able to import, but the import inside Translation eventually caused Sphinx to return the same error.

The documentation in question is here:

Zamboni Documentation

+2


a source to share


1 answer


Looking at the source of Zamboni, perhaps you should be doing:

.. automethod:: apps.translations.models.Translation.new

      



?

0


a source







All Articles