this was for me also a slight trick to learn.  I got more from blog posts
than the docs
(and I love the django docs)

the trick is that your PYTHONPATH (and don't forget the python path of your
deployment server)
should point to the dir above your project dir and the dir above your apps
dir.


I have
echo $PYTHONPATH
/Users/crucial/Sites/gitpo.git/djapps:/Users/crucial/Sites/gitpo.git/pluggables

djapps
   app1
   app2
pluggables
   thirdpartyapp1
   thirdpartyapp2

site1
   manage.py
site2
   manage.py

site1www
   images


so in development when I run site1, due to PYTHONPATH I also have djapps and
pluggables in my path

from app1.models import *



(I agree keeping the intro tutorial very simple is best.
perhaps it could then link to a best practices of folder layout so that you
can grow
  when I try out a system I am really on a first date.
I don't want to know about the maintenance issues. )




On Sun, Jan 11, 2009 at 10:41 PM, dahpgjgamgan <dahpgjgam...@gmail.com>wrote:

>
> Hi,
>
> In the 4-part tutorial on Django's main site, there's a lot of advice
> on how to decouple apps and projects, but when I look at the import
> statements in most of the tutorial's files, it's always "from
> projectname.appname.... import ....." - not very decoupled for me. Am
> I missing something, is there a good reason why those imports look
> like that and not simply "from appname... import ..."?
>
> Thanks!
>
> >
>

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

Reply via email to