Wednesday, June 29, 2011

unable to import Modules Present in subdirectores

Hi Guys

I am very new to Python and Django and having problem with importing modules in my project,

I am following the tutorial, which i downloaded from django website. Where I have the following folder hierarchy in my Django project.(using Pycharm IDE)


I am able to import modules from my site folder which is HelloWorldDjangoApp, but having problem in importing from the subfolders. 
For example I have in polls directory and iam not able to import it.

It is unable to find the modules in the subdirectories like  polls.views 

What do i do?   i believe some Env variable has to be modified, Because currently the    sys.path has path upto my HelloWorldDjangoApp directory.. What do i do for subdirectories.

Thank you in advance.. 




No comments:

Post a Comment