#17638 closed Cleanup/optimization (fixed)
Link up topic guides with API reference
Reported by: | Tomek Paczkowski | Owned by: | Duane Hilton |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | afraid-to-commit |
Cc: | internet@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description
There is one thing bothering me with Django documentation: it's split between topic guides and API reference. Often while googling I get to wrong one and it's not always easy to find another. There should be an easy way to do that: a link at the top/bottom/sidebar. And this way should probably be somehow automatic, so new pages are connecte automatically.
Change History (29)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Type: | Uncategorized → New feature |
---|
comment:3 by , 11 years ago
Easy pickings: | set |
---|
I think this is done manually in several places and I think we should probably keep it that way as automating it is not likely to be worth the effort.
Auditing the current links between topics and reference guides and adding any that are missing would be a good task for a new contributor.
comment:4 by , 11 years ago
Cc: | added |
---|
I don't mind taking a look at this if someone could add an example where this is done well, and an example where this is done badly so I know what I'm looking to correct and what I'm aiming for.
comment:5 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 11 years ago
There are currently three styles of linking from an API reference page to the appropriate topic.
- A link within the first paragraph which leads to the canonical topic page.
ex. https://docs.djangoproject.com/en/1.5/ref/class-based-views/
- Inline links within subtopics of an API reference which lead to a subtopic on a topic page, which may be part of a different module.
ex. https://docs.djangoproject.com/en/1.5/ref/django-admin/#s-compilemessages
- A div with a class of "admonition" which contains links to a mix of topic and API reference pages.
ex. https://docs.djangoproject.com/en/1.5/ref/signals/
I think it would be useful to wrap all links to the canonical topic pages in an admonition styled div. Wrapping links in a styled div within a subtopic may be disruptive to the flow of the document. Perhaps these should all be collected in a admonition styled div at the bottom of a page, though this goes against DRY principles.
Counter to this suggestion, the DRY subtopic of the design philosophies page has an admonition styled div within the subtopic, linking to an external resource.
https://docs.djangoproject.com/en/1.5/misc/design-philosophies/#s-don-t-repeat-yourself-dry
comment:7 by , 11 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:9 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:10 by , 11 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:11 by , 11 years ago
I'd be interested to look at this as a first bug, but I'm a little unclear exactly what is wanted. I've put together a quick screenshot of class based views introductory material (current) and class based views API reference (current) using the admonition unit for see also links at the top of each. If I did something like that for each page in API ref/intro material with links to other material at the top, would that be vaguely along the right lines?
I'm not really sure about the second example mentioned above, inline links look fine to me as they are.
comment:12 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Implemented per my above screenshots for them pages, can be seen here. https://github.com/mcintyre94/django/tree/ticket_17638
Happy to run through some other files and do the same thing if that's what's wanted here, but I'd appreciate some feedback first. ASsigned to myself, hope that's alright!
comment:14 by , 11 years ago
I don't think the table of contents should be moved into the "See Also" boxes, otherwise, this looks ok.
comment:15 by , 10 years ago
Owner: | changed from | to
---|---|
Type: | New feature → Cleanup/optimization |
There was no action since 4 months, I hope it's okay that I adopt this ticket.
comment:17 by , 10 years ago
Has patch: | set |
---|
Pull request: https://github.com/django/django/pull/2975
comment:18 by , 10 years ago
Patch needs improvement: | set |
---|
The idea was to do this for all pages that have both topic and ref docs, not just for class based views.
comment:20 by , 10 years ago
Patch needs improvement: | unset |
---|
Don't forget to uncheck "Patch needs improvement" so the ticket goes back in the review queue. I'll try to review and commit this soon, thanks.
comment:21 by , 10 years ago
Patch needs improvement: | set |
---|
The first '.. seealso::' box was introduced 2008 and the box was at the bottom of the page in forms/topics/index and I think that would be better like the solution done in here. (all boxes at the top)
Also one box is duplicated. (the one in forms/topics/index is at the top and the bottom ;))
comment:22 by , 10 years ago
I think it makes sense to put the "see also" boxes at the bottom of the topic guides (after you've read the introductory material, you might be interested in the reference guides). For the reference guides, I suggest we omit the "see also" boxes, but have the link in the introductory paragraph as is already done in a couple places (e.g. For "introductory material, see :doc:/topics/class-based-views/index
.")
comment:23 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Someone else is welcome to pick where jarus left off.
comment:24 by , 10 years ago
Keywords: | afraid-to-commit added |
---|
I've marked this ticket as especially suitable for people following the Don't be afraid to commit tutorial at the DjangoCon US 2014 sprints.
If you're tackling this ticket, please don't hesitate to ask me for guidance if you'd like any, either at the sprints themselves, or here or on the Django IRC channels, where I can be found as EvilDMP.
comment:25 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:26 by , 10 years ago
Following comments and what has already been done, I added links to the bottom of the topics pages for templates, settings, models, and migrations that go to the corresponding reference pages. I also added links to the top of ref/settings and ref/migration-operations that go to the corresponding topics pages. https://github.com/django/django/pull/3285
comment:27 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Can't hurt.