A
A
Alexander2018-03-30 07:53:11
Django
Alexander, 2018-03-30 07:53:11

What is the correct way to set up VSC to work with Django?

5abdc240a628c027383211.png

[pylint]
 E1101:Instance of 'MyModelName' has no 'id' member

class MyModelName(models.Model):
    ...
    def __str__(self):
         return str(self.id)

Something I did not find a special plugin that does all this for me.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-03-30
@kentuck1213

sudo -H pip3 install pylint_django
VSC:
"python.linting.pylintArgs": [
        "--load-plugins", "pylint_django"
    ],

D
Dimonchik, 2018-03-30
@dimonchik2013

https://djangobook.com/developing-django-visual-studio/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question