2
我有一個偷偷摸摸的懷疑,獅身人面像不喜歡我的班級翻譯。當我嘗試做一個automethod:斯芬克斯automodule不願意進口翻譯
.. automethod:: translations.models.Translation.new
我得到這樣的警告:
/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
的路徑和諸如此類的東西是正確的。我試過直接在conf.py中導入翻譯,並有類似的問題。我仍然有問題時,我想是這樣:
from translations.models import Translation as t
它能夠導入,但翻譯中的導入最終導致獅身人面像回到了同樣的錯誤。
有問題的文件是在這裏: