Hello everyone,

I am working on a CMS that includes a bunch of applications (like
Story, Event, etc...) with some being propriatary and some being third
party. When it comes to our naming conventions, we've had a bit of
discussion over namespace issues. Now I have been referencing James
Bennett's post on Projects (http://www.b-list.org/weblog/2007/nov/09/
projects/) to make the argument that we should be putting our
application directory under the Python path and then importing our
apps like:

from story.models import Story

But the other side of the discussion is instead doing something like:

from foobar.story.models import Story

... where foobar is our Python package name (the name of our CMS
basically) so that we can avoid possible namespace issues.

I have read the Python docs (http://www.python.org/doc/2.5.2/tut/
node8.html#SECTION008400000000000000000) about packages and it seems
as though the recommended approach would be to do the second example
(from foobar.story.models import Story) but from everything Im hearing
in the Django community is that the one I propose (from story.models
import Story) is the preferred method.

Could anyone shed some light on the issue and let me know which one is
the best approach in your mind (I know there are "many ways to skin a
cat"...)?

Thanks for any help!

Cheers


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to