Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19506 closed Uncategorized (fixed)

Minor Error in 1.4 ePub Doc?

Reported by: moc@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords: INSTALLED_APPS, models.py
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hi,

I am the proverbial "newby"; I hope that I am being of assistance rather than being an annoyance.

On about page 178 in the Using Django---Models and Databases---Using models subsubsection it states:


For example, if the models for your application live in the module mysite.myapp.models (the package structure that is created for an application by the manage.py startapp script), INSTALLED_APPS should read, in part:

INSTALLED_APPS = (

#...
'mysite.myapp',
#...

)


My understanding, which comes from the 4-part tutorial at the beginning, is that the "mysite." shouldn't be there. You say, in the tutorial, that Django doesn't care what you name the folder that the project is in--- only the inner mysite name must be kept the same. Paths are evidently referenced to the outer mysite directory, which does contain a directory myapp which contains the models.py file, all of which means that we don't include the name of the outer directory in the path.

I have tested this by trying your version with mysite.myapp and it doesn't work. Just 'myapp' alone works.

Thanks so much for your good work,

-Mike O'Connor
Shelton, WA

Change History (4)

comment:1 by anonymous, 12 years ago

comment:2 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 52a2588df69e5252bee98e76e8d3a2aa37bce23c:

Fixed #19506 - Remove 'mysite' prefix in model example.

Thanks Mike O'Connor for the report.

comment:3 by Tim Graham <timograham@…>, 12 years ago

In 91af9230add54138e1c397a193301f3498df64c1:

[1.5.X] Fixed #19506 - Remove 'mysite' prefix in model example.

Thanks Mike O'Connor for the report.

Backport of 52a2588df6 from master

comment:4 by Tim Graham <timograham@…>, 12 years ago

In c4a9e5bd8d4c158e63b2fc77796a961ba0a191f4:

[1.4.X] Fixed #19506 - Remove 'mysite' prefix in model example.

Thanks Mike O'Connor for the report.

Backport of 52a2588df6 from master

Note: See TracTickets for help on using tickets.
Back to Top