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)
HelloWorldDjango
HelloWorldDjango/HelloWorldDjangoApp
HelloWorldDjango/HelloWorldDjangoApp/polls
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 Views.py 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.
No comments:
Post a Comment