【发布时间】:2013-08-24 10:46:49
【问题描述】:
我一直在 stackoverflow 和官方文档中寻找答案,但仍然找不到解决方案。
在我的主 Sphinx-doc 文档中:
Contents:
.. toctree::
views/index.rst
db/index.rst
在views/index.rst中
.. py:currentmodule:: app.views
.. py:function:: create_user
this function uses create_user_db
在 db/index.rst 中
.. py:currentmodule:: app.db
.. py:function:: create_user_db
this function creates the user in database
我需要的是从 create_user 到 create_user_db 所在位置的超链接。
函数不是由 autodoc 生成的,我不想为 db/index 中列出的每个函数使用节和 *.. _section_label :*。
是否有可能使用 :doc:、:ref: 或其他方式将视图链接到 db/index.html#app.db.create_user_db?
【问题讨论】:
标签: python hyperlink python-sphinx cross-reference