#14255: Factoring mysite out of tutorial imports
---------------------------+------------------------------------------------
 Reporter:  adamend        |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Documentation  |     Version:  SVN       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  1              |  
---------------------------+------------------------------------------------
 It seems desirable to not teach people the bad habit of including the
 project name in their app code, though the tutorial currently does this. I
 have looked at previously closed tickets, which recommend just replacing
 the reference to mysite when redoing the urlpatterns. This goes further,
 and makes changes through all four tutorials. Of particular note are
 Russell's comments on #14216 and #11464 that mention a new tutorial or a
 tutorial rewrite to introduce reusable apps. I'm not sure this is
 necessary, as the current tutorial seems to work fine if you just remove
 the bad habit part, but I'm willing to do a more extensive rewrite or add
 a section if that's deemed necessary (FYI, I'm planning a bit more
 tutorial refactoring/addition, this is a first step).

 The included patch does the following:

  * Removes all mentions of `mysite` in code. So for instance, import from
 `polls.models`, not from `mysite.polls.models`

  * Replaces the paragraph below the "Projecs vs. apps" admonition. It used
 to talk about coupling the app to the project with the imports. It now
 says that your apps can live anywhere on the Python path and that we will
 create the poll app inside the myapp directory in this tutorial.

  * Changes the copy in the "Bypassing manage.py" adminotion to say that
 polls should also be on your Python path if you want to go this route.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14255>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to