I have just created a Django project in a virtual environment and I'm getting this error or warning I'm not quite sure :
(module) django Import "django.contrib" could not be resolved from source Pylance(reportMissingModuleSource)
in every line that has import from django
.
I have searched for this problem and I have tried these so far :
editing Settings.JSON file in VScode by adding :
"python.pythonPath": "C:/Users/abdur/dev/cfehome/django_project/Scripts/python.exe",
Which is the python.exe location in my virtual environment
I have selected Python Interpreter to the one that is inside the virtual environment like this picture :
I have tried the other choice too but didn't work as well .
However when I run python manage.py runserver
it works without giving me any errors but I'm trying to understand why I'm getting these warnings .