PyLint for Django in VSCode

Daria Kolodzey
Feb 18, 2021

--

The main twist is to call PyLint with pylint-django plugin.

Step 1: install PyLint and pylint-django

Run pip install pylint pylint-django for the python instance you use in VSCode for your Django project.

Step 2: modify the settings

For a project with the following structure:

complete settings.json will look like this:

Note that the word example in the string --django-settings-module=example.settings matches the name of the folder with settings.py.

Troubleshooting

  • Check that you use the correct python, i. e. python.pythonPath setting is correct
  • Check that you’ve actually installed pylint-django
  • Double check path to Django settings
    --django-settings-module=yoursite.settings

--

--