{{{
#!python
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/32950>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
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
docs/ref/contrib/admin/index.txt: from myproject.myapp.models
import Author
docs/ref/contrib/admin/index.txt: from myproject.myapp.models
import Author
docs/ref/contrib/admin/index.txt: from myproject.admin_site import
custom_admin_site
docs/ref/contrib/admin/index.txt: from myproject.myapp.models import
Image, Product
docs/ref/contrib/admin/index.txt: from myproject.admin import
advanced_site, basic_site
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:1>
* owner: nobody => Abhyudai
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:2>
Comment (by Abhyudai):
Replying to [comment:1 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/14682 pull-request]
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"019424e44efe495bc5981eb9848c0bb398a6f068" 019424e4]:
{{{
#!CommitTicketReference repository=""
revision="019424e44efe495bc5981eb9848c0bb398a6f068"
Fixed #32950 -- Removed myproject from imports in admin docs where
appropriate.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"de5a044cf49ba3d856388fe008f1e1a82a69b699" de5a044]:
{{{
#!CommitTicketReference repository=""
revision="de5a044cf49ba3d856388fe008f1e1a82a69b699"
[3.2.x] Fixed #32950 -- Removed myproject from imports in admin docs where
appropriate.
Backport of 019424e44efe495bc5981eb9848c0bb398a6f068 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32950#comment:7>