Issue
So i'm studying python crashcourse and after finishing the basics I jumped to the django project.
I created a virtual env, installed django and created an app with manage.py startapp command.
I use Visual Studio Code, and the problem is when I go to models.py it gives an error that it's unable to find django.db module
Now I understand this is because of the file structure, which is as per my research the correct one, and I followed the book carefully, however i don't know how to fix this and I feel that i'm missing something.
This is my file structure for the virtual environment
Any idea how to fix it ? :)
Thanks in advance
Solution
VS is not seeing your virtualenv. You need to activate it for VS code so that it knows that django is installed in the virtualenv see https://code.visualstudio.com/docs/python/environments
Answered By - Incognos Answer Checked By - Willingham (WPSolving Volunteer)