I have created a new project from existing (django project) code. When I right click on any django function and click "Go To Definition", I get the error "Cannot go to definition x." When I try to run the code however, it runs just fine,
I am using the following software:
-Python 2.7 (x86)
-Visual Studio 2010
-Windows 7 (x64)
Django is installed in "C:\Python27\Lib\site-packages\django". I think the problem might be that PTVS does not search for the code files in the same directories as the python interpreter. I have already tried the following things myself:
-Because I did not have a PYTHONPATH environment variable, I created one with value "C:\Python27\Lib\site-packages\;C:\Python27\Lib\".
-I have added various relevant paths to the "Search Path" in the Solution Explorer.
-I have done Options - >"Generate Completion Database" -> "Generate built-in and standard library database"
None of this had any effect. I believe this could be a bug because the library code files are available to the interpreter (the code runs) but i am unable to "Go To Definition" on library functions. Also, the problem is not django specific, I have
the same issue with other libraries installed in site-packages.