Thursday, January 5, 2012

Re: project root or its parent in pythonpath?

On Thursday, January 05, 2012 2:21:30 PM, Demetrio Girardi wrote:
>
> I have two apps which are inter-dependent and import stuff from one
> another; if I decide to go for the project.app route, is there a way
> to import
> things without a reference to the project name? otherwise the imports
> would
> have to be rewritten when the apps are installed in another projcet.
>

If you have two apps that import from one another, then I'd suggest
merging them into a single app -- it indicates that the features of the
two are coupled and not useful without each other anyhow.

That said, I would vote that it's better to add to your PYTHONPATH in
the IDE settings than it is to have the apps import stuff via an 'import
project.app'.

--
David W. Harks<dave@dwink.net>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment