Project tree and import module

ftg at lutix.org ftg at lutix.org
Fri Jun 8 11:45:09 EDT 2018


Hello,

here is my project hierarchy:
myproject
 |
 |- django-project-name
 | |- django-project-name
 | | |-urls.py
 | | |-views.py
 | |- manage.py
 |- my-package

Is my projet tree correct? Shouldn't I put my-package into my django-project-name folder?
Because I am facing some questionning about how to reach my-package from views.py and in the current situation, 
I have to insert a sys.path.append line (with full path) in my views.py file, and I don't find this very elegant.
What if my package is really in another folder location? Should I need to use the sys.path.append function anyway?

Thanks



More information about the Python-list mailing list