PyCharm cannot resolve Django imports

Hi,

I have downloaded the PyCharm test version, and loaded a project of mine.

I created the project like this:

> virtualenv myproject

> cd myproject

> . bin/activate

> pip install django

> django-admin.py startproject myproject

Now I have told pycharm to open the _inner_ myproject directory, which worked just fine. I have created a python interpreter which points to the _outer_ directory's bin/python binary, which also removed a red "x" and an error mark from the python interpreter.

But still.

If I open a source file, e.g. models.py, pycharm says of the django.db import "cannot resolve".

If I "run" the file pycharm cannot find the import either and the python session aborts with an error.

I _have_ myproject/lib/...../site-packages containing "django" and the django .py files in my interpreter's path list.

Any advice here? I am kind of lost, and this is annoying.

Thanks in advance,

Axel.

Please sign in to leave a comment.