使用 Django 标签生成 sphinx 文档

发布于 2025-01-12 08:27:17 字数 351 浏览 2 评论 0原文

我正在尝试使用 Django 项目的阅读文档模板生成 sphinx 文档。 我使用 Django 标签记录它

例如 Download :model:`ManagementSoftware.Order` CSV

当我尝试使用命令 make html 生成文档时,我收到错误

docstring of ManagementSoftware.views.DownloadOrdersCSV:1: ERROR: Unknown interpreted text role "model".

我应该怎么办?是否有任何 sphinx 扩展可以包含这些标签?

I am trying to generate a sphinx documentation using the Read the Docs template for a Django project.
I am documenting it using the Django tags

For example Download :model:`ManagementSoftware.Order` CSV

When I try to generate the documentation with the command make html I get the error

docstring of ManagementSoftware.views.DownloadOrdersCSV:1: ERROR: Unknown interpreted text role "model".

What should I do? Is there any sphinx extension to include those tags?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文