#32950 closed Bug (fixed)
Remove "myproject" from imports in docs
Reported by: | Ken Whitesell | Owned by: | Abhyudai |
---|---|---|---|
Component: | Documentation | Version: | 3.2 |
Severity: | Normal | Keywords: | ModelAdmin |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The first example in the section for class ModelAdmin has the following line:
from myproject.myapp.models import Author
(There are multiple occurrences of this on this page.)
Is it proper to specify the "myproject" path component here?
It looks to me like this would only be valid if the manage.py file were located "above" the myproject directory, which is different from where the startproject command places it.
Change History (7)
follow-up: 3 comment:1 by , 3 years ago
Summary: | Documentation errors in ModelAdmin objects (/ref/contrib/admin)? → Remove "myproject" from imports in docs |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 3 years ago
Replying to Tim Graham:
Yes, I think that should be adjusted. A complete audit:
docs/ref/contrib/syndication.txt: from myproject.feeds import LatestEntriesFeed docs/ref/contrib/syndication.txt: from myproject.feeds import AtomSiteNewsFeed, RssSiteNewsFeed
I think these are appropriate, since the documentation here talks about adding feeds. Changing this to something like from feeds import LatestEntriesFeed
could likely be more confusing, in my opinion.
docs/ref/contrib/admin/index.txt: from myproject.admin_site import custom_admin_site docs/ref/contrib/admin/index.txt: from myproject.admin import advanced_site, basic_site
Here, the documentation refers to using custom admin
site for different purposes, and these shouldn't necessarily be fit into an app
. I think it would be appropriate to keep this in its original form.
comment:5 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Yes, I think that should be adjusted. A complete audit: