[Answered ]-PyLint failing for a number of Django imports

1๐Ÿ‘

โœ…

I think I figured it out โ€” if you jump into a python session and actually try to import anything from django.db

from django.db import *

youโ€™ll get an error about DJANGO_SETTINGS_MODULE not being set. Setting the environment variable and pointing it to your settings.py like app.settings should fix the error for you.

When I tried this in an Eclipse/PyDev config I had to disable pylint, build, then re-enable pylint to finally clear out those errors.

๐Ÿ‘คjtjin

1๐Ÿ‘

Have you tried djangolint, which is a wrapper around Pylint with Django-specific settings?

๐Ÿ‘คgurney alex

Leave a comment