我在狮身人面像的conf.py
里有
intersphinx_mapping = {
'django': ('http://docs.djangoproject.com/en/dev/', 'http://docs.djangoproject.com/en/dev/_objects/'),
# 'python': ('https://docs.python.org/3.5', None),
}
现在我试图引用一个 Django 模型:
"""For Django :django:class:`django.forms.fields.ChoiceField`."""
它不会在 HTML 中产生正确的东西。
怎么做?
Per objects.inv 不可用于 intersphinx:
intersphinx_mapping = {
'django': ('https://docs.djangoproject.com/en/dev/',
'https://docs.djangoproject.com/en/dev/_objects/'),
}
然后在文档中,以下任一都可以工作:
:class:`~django.forms.ChoiceField`
:class:`django.forms.ChoiceField`
我通过搜索他们的回购找到了。