Thanks Tom,
Did something similar: added app/ directory as a module, so now all my
imports look like app.A.
On Thursday, June 5, 2014 5:12:53 PM UTC+4, Tom Evans wrote:
>
> On Wed, Jun 4, 2014 at 8:51 AM, Vahe Evoyan > wrote:
> > I have modules in the project with the same names, all placed in
On Wed, Jun 4, 2014 at 8:51 AM, Vahe Evoyan wrote:
> I have modules in the project with the same names, all placed in different
> applications.
>
> Particularly there are two apps that conflict and result an ImportError. The
> project structure approximately is as follows.
>
> project
> |_ projec
It currently works as you describe: "from .B.models import BModel", but I
need it to work like "from ...B.models import BModel" to import
apps/B/models.py module. The problem with "..." is that apps directory is
not a module (i.e. there is no __init__.py file). The app directory is the
first on
It may be worth trying a relative import, depending on which version of
Python you're using. I believe you can do "from .B.models import BModel".
Note the '.' full-stop/period before the module. I can't promise that
will fix your problem, as the layout isn't entirely clear to me, but it
migh
I have modules in the project with the same names, all placed in different
applications.
Particularly there are two apps that conflict and result an ImportError.
The project structure approximately is as follows.
project
|_ project
|_ settings.py
|_ ...
|_ apps
|_ A
|_ hand
5 matches
Mail list logo