1

Closed

IntelliSense isn't aware of my Django apps in PTVS 2.1

description

(From https://pytools.codeplex.com/discussions/543107)

I just installed PTVS 2.1 and I opened my Django project that was working with PTVS 2.0.

Now, IntelliSense does not recognize any of my apps. All local import statements have this error:
Unable to resolve "app.module". IntelliSense may be missing for this module.
However, it will not complain if I import "project.app.module".

Removing project\__init__.py solves the problems.
Closed Aug 1 at 6:38 PM by Zooba
Resolved as part of another issue

comments

Zooba wrote Apr 23 at 7:06 PM

project\ is probably in sys.path at runtime (as the cwd) but is not treated like that when analyzing. We should generate module names based on search paths rather than relying on the file system.

alumni wrote Apr 23 at 7:24 PM

That is correct. If I run the Django shell can see that '.' is in sys.path, and os.path.realpath('.') would yield ...\\project.