2

Suppose you have an app named 'foo'

and you are in the 'bar' app's subdirectory, e.g. my_site/bar/views/my_view.py.
From this file, you want to from foo import a.

Problem is, in that directory, you also have foo.py and import doesn't work.

Easy fix would be to change the foo.py file name, but is there other way around it?

4

0 回答 0