Class has no objects member

Solution 1:

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"
],}

Solution 2:

@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.