Search code examples
djangovisual-studio-codepylint

Visual studio code cannot import anything from django pylint error


I have a project in django , and it is working fine. But when i changed my pc i install vscode and pylint plugin and began to appear some erros import-error.

http://prntscr.com/na3r2t

Anything imported from django opens this error


Solution

  • You need to have the Pylint plugin pylint-django installed to make Pylint understand the Django web framework:

    pip install pylint-django
    

    Then add the following lines to your settings.json (this will load the plugin):

    "python.linting.pylintArgs": [
        "--load-plugins=pylint_django"
    ]