On Mon, Oct 26, 2009 at 8:23 PM, Kevin Teague <[email protected]> wrote:

>
> It's Python which doesn't allow dots in the name of a package,
> although it's Django which is putting the name of your project name on
> sys.path. This was intentional, see the django.core.management
> package:
>
>    # Import the project module. We add the parent directory to
> PYTHONPATH to
>    # avoid some of the path errors new users can have.
>
> To fix the code is easy enough. But to update all of the relevant
> documentation and to require all existing Django deployments to have
> to migrate their project structures (or change all of their imports)
> to upgrade is a much bigger issue to tackle. In the long run, this
> would be a good change, since the current situation is confusing and
> can cause a lot of problems - but I think it will take a fair bit of
> effort and championing to fix it.


IMHO the project namespace is a useful one to keep around.  If you lose the
project name space, then you risk polluting your python path with a lot of
generic 'urls' modules, among other things.

If your directory structure on your server includes the domain name, then
include the project folder under that.  There's nothing stopping you from
housing more generic apps outside the project namespace.

On a related note, an on-going pet peeve of mine is that manage.py leaves
'.' on the python path.  This can be confusing for new users who are trying
to figure out how to structure their imports.

Tobias
-- 
Tobias McNulty
Caktus Consulting Group, LLC
P.O. Box 1454
Carrboro, NC 27510
(919) 951-0052
http://www.caktusgroup.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to