Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#10315 closed Uncategorized (fixed)

objects.inv not available for intersphinx

Reported by: awatts Owned by: Jacob
Component: Documentation Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm writing documentation for my Django app, and I'm using Sphinx with the intersphinx extension. I'd like to be able to cross-reference Django modules, but http://docs.djangoproject.com/en/dev/objects.inv either doesn't exist or is not served. Currently I'm making my own ad hoc inventory file, but it would be nice if I could reference the real one.

See http://docs.python.org/objects.inv as an example of a site that does provide the cross-referencing information.

Change History (5)

comment:1 by Jacob, 16 years ago

Owner: changed from nobody to Jacob
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Jacob, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [10069]) [djangoproject.com] Expose objects.inv for intersphinx links. Fixes #10315.

comment:4 by ben, 15 years ago

It might also be worth mentioning here that you'll need to download this and stick it in your sphinx source directory (as django.inv in the conf.py example below). Then you need something in conf.py like this:

intersphinx_mapping = {
  'http://docs.djangoproject.com/en/dev': 'django.inv',
  }

This doesn't guarantee that your link to a django object will be picked up. If you get something like this:

Exception occurred: 60%] index                                           
  File ".../writers/html.py", line 478, in unknown_visit
    raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
NotImplementedError: Unknown node: pending_xref
The full traceback has been saved in /tmp/sphinx-err-z5XcJy.log, if you want to report the issue to the author.

Then check that it's in the inv file.

comment:5 by Thomas Güttler, 13 years ago

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

Here is a working sphinx config.py snippet:

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.intersphinx"]
intersphinx_mapping = {
    'python': ('http://docs.python.org/2.7', None),
    'sphinx': ('http://sphinx.pocoo.org/', None),
    'django': ('http://docs.djangoproject.com/en/dev/', 'http://docs.djangoproject.com/en/dev/_objects/'),
}
Note: See TracTickets for help on using tickets.
Back to Top