--
Ticket URL: <https://code.djangoproject.com/ticket/17238>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
While some references in the docs could be auto linked to the appropriate
source code file - many would not. This represents two challenges:
* going in and finding all the references and making them links/explicit
to source location
* setting the expectation that all future docs efforts follow this
standard
I actually have more of an issue with the latter. The docs should not
require the source to make sense. If something is not explained well
enough to use it without the source, then that is a problem with the docs.
Anyone who want to better understand the internals, should develop the
skills to quickly find that location in the source.
Lastly, the source browser and docs may not always be available to each
other. I build docs locally - and then may move them somewhere for
viewing - making links explicit makes the two overly coupled IMO.
I'm leaving this as unreviewed, as I feel my solo opinion is not enough to
warrant a close.
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:1>
* stage: Unreviewed => Design decision needed
Comment:
Sphinx has an extension to support this:
http://sphinx.pocoo.org/ext/viewcode.html
I don't know if the website would support it out of the box. If it does,
we could enable this extension.
Marking as DDN because this needs some testing before we commit to
implementing it.
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:2>
* stage: Design decision needed => Accepted
Comment:
In fact, this ticket should be "Accepted", because the idea is worth
exploring.
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:3>
Comment (by pydanny):
When I did this for the refactored CBV docs in June of 2012, @jacobian
said he didn't want this feature and had me take out the direct code
references. He said it made the documentation much harder to maintain.
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"9ed4a8c6b1a552a03fd27b77f1b742e3f9c66bde"]:
{{{
#!CommitTicketReference repository=""
revision="9ed4a8c6b1a552a03fd27b77f1b742e3f9c66bde"
Fixed #17238 -- Added source code links to docs using sphinx.ext.viewcode.
Thanks santiagobasulto for the suggestion.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"477ab02312d47969bdfd7c1616da27379bb1b967"]:
{{{
#!CommitTicketReference repository=""
revision="477ab02312d47969bdfd7c1616da27379bb1b967"
[1.6.x] Fixed #17238 -- Added source code links to docs using
sphinx.ext.viewcode.
Thanks santiagobasulto for the suggestion.
Backport of 9ed4a8c6b1 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"dc9751a6e7009290b1515934ccf771e2306aa4ab"]:
{{{
#!CommitTicketReference repository=""
revision="dc9751a6e7009290b1515934ccf771e2306aa4ab"
[1.7.x] Fixed #17238 -- Added source code links to docs using
sphinx.ext.viewcode.
Thanks santiagobasulto for the suggestion.
Backport of 9ed4a8c6b1 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17238#comment:7>