Class has no objects member Class has no objects member python python

Class has no objects member


Install pylint-django using pip as follows

pip install pylint-django

Then in Visual Studio Code goto: User Settings (Ctrl + , or File > Preferences > Settings if available ) Put in the following (please note the curly braces which are required for custom user settings in VSC):

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


@tieuminh2510's answer is perfect. But in newer versions of VSC you will not find the option to edit or paste that command in User Settings.

For newer versions, add the code in the following steps:

  1. Press ctrl shift p to open the the Command Palette.
  2. Now in Command Palette type Preferences: Configure Language Specific Settings.
  3. Select Python.
  4. Add these lines inside the first curly braces:
    "python.linting.pylintArgs": [            "--load-plugins=pylint_django",        ]

Make sure that pylint-django is also installed.


Install Django pylint:

pip install pylint-django

ctrl+shift+p > Preferences: Configure Language Specific Settings > Python

The settings.json available for python language should look like the below:

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