OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Project tree and import module


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