tango4567 / solutions

Here I am adding lots of different stuff. This is the collection of problems with their solutions. Most important please share good vibes and correct me if you found anything wrong here. Thanks in advance.
Apache License 2.0
5 stars 0 forks source link

Import "rest_framework" could not be resolved. #44

Closed tango4567 closed 2 years ago

tango4567 commented 2 years ago

Reference Code:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'website',
    'rest_framework',
]
tango4567 commented 2 years ago

Solution: If you are using VSCode, Ctrl + Shift + P -> Type and select 'Python: Select Interpreter' and enter into your projects virtual environment.

Important Comment: This should be checked by everyone that correct python Interpreter is selected. Path should be in virtual environment – chetan suri

Source: Import "rest_framework" could not be resolved. But I have installed djangorestframework, I don't know what is going wrong