代码之家  ›  专栏  ›  技术社区  ›  porton

如何引用斯芬克斯文档中的Django模型?

  •  0
  • porton  · 技术社区  · 6 年前

    我的脑子里有 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),
        }
    

    """For Django :django:class:`django.forms.fields.ChoiceField`."""
    

    它不能在HTML中生成正确的内容。

    1 回复  |  直到 6 年前
        1
  •  1
  •   Steve Piercy    6 年前

    objects.inv not available for 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`
    

    我通过 this search of their repo .