I'm following the tango with django tutorial and everything was going great until I got to this section: http://www.tangowithdjango.com/book/chapters/models.html#creating-a-population-script I got an error that stated 'django.db not found'. I imported models from django.db in the models file and after doing some investigation, I noticed that my path seems to be off.
BASE_DIR = os.path.dirname(__file__)
points to the location of the pycharm IDE - /users/applications/pycharm.app. I use a MAC.
I tried to get the base to point to the root of the project file by doing the following: Preferences -> Python Console -> I selected the tango_with_django_project and made it the source. However, this does not seem to help.
Please assist!!!
Thanks!
Update: I'm still unsuccessful with this. I have tried configuring the paths in virtualenv but to no avail. Help, please!
Attached is my project path. when i run 'python populate_rango.py' from the terminal, i get this error:
Traceback (most recent call last):
File "populate_rango.py", line 62, in <module>
from rango.models import Category, Page