#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 , 17 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 16 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 , 14 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/'),
}
(In [10069]) [djangoproject.com] Expose objects.inv for intersphinx links. Fixes #10315.