Why doesn't VSC offer me imports from Django Rest Framework?
For example, I want to quickly do from rest_framework.response import Response
, but VSC doesn't want to help me ;(
Why doesn't VSC offer me imports from Django Rest Framework?
For example, I want to quickly do from rest_framework.response import Response
, but VSC doesn't want to help me ;(
Even with the correct interpreter path and DRF installed in virtual env and pylance autoImportCompletions enabled, I still couldn't get it working...what ultimately did the trick was adding this to settings.json:
"python.analysis.autoImportCompletions": true,
"python.analysis.indexing": true,
"python.analysis.packageIndexDepths": [
{
"name": "django",
"depth": 10,
"includeAllSymbols": true,
},
{
"name": "rest_framework",
"depth": 10,
"includeAllSymbols": true,
}
]