pylint django with django-configurations
NickName:Yvain Ask DateTime:2021-02-17T23:32:15

pylint django with django-configurations

UPDATE 2021 March 29 : There is a known issue here

How to make pylint-django work together with django-configurations ?

I've setup a Django project in VS code with pylint and django-pylint as linter.

I have a conflict with django-configurations, a package that I use to have different config file depending on environment.

I specify django-settings-module in order for django-pylint to understand django project.

Settings.json in vscode looks like this :

{
// ...
"python.linting.pylintArgs": [
    "--load-plugins", "pylint_django", // Works fine
    // "--django-settings-module", "project.settings" // Do not work anymore when adding this
    ],
],
// ...
}

Also I've tried the same config file with another django project that does not use django-configurations and pylint django works well with second line on.

Copyright Notice:Content Author:「Yvain」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66245115/pylint-django-with-django-configurations

More about “pylint django with django-configurations” related questions

pylint django with django-configurations

UPDATE 2021 March 29 : There is a known issue here How to make pylint-django work together with django-configurations ? I've setup a Django project in VS code with pylint and django-pylint as linte...

Show Detail

Django-Configurations is causing my STATIC_URL to be invalid

I have a django(1.6.5) project and I am using the django-configurations(0.8) package and I am trying to set the STATIC_URL in the settings.py file with an environment variable by doing: from

Show Detail

Split configuration files using django-configurations

A package built for Django, django-configurations extends module based setting loading with object oriented patterns. The package uses DJANGO_SETTINGS_MODULE and DJANGO_CONFIGURATION environment

Show Detail

django-configurations with Gunicorn

Been trying to deploy Django with Gunicorn for the first time, and while it starts up fine, I get the following two tracebacks when I try requesting a page. Clearly something is off with Gunicorn s...

Show Detail

Pylint with Django

I have the following directory structure in a Django project: . ├── config ├── element ├── home ├── static ├── templates&

Show Detail

Running pylint with pylint_django throws error

Installed pylint with pip. Installed pylint-django with pip. When pylint is invoked with pylint --load-plugins pylint_django /projectsource throws the following erros Traceback (most recent call...

Show Detail

pylint (pylint_django) does not work when --django-settings-module flag is specified

I am using newest version of pylint_django released few days ago: Package Version ----------------------------- ---------- pylint 2.7.4 pylint-django ...

Show Detail

pylint_django throwing exception

I am using Python v3.6, Django v2.0 and am having a problem with pylint_django. Firstly, if I run "pylint polls/" to run it on a folder it runs fine and show all the code issues for all the files ...

Show Detail

How to use pylint_django?

I am new to linting, using python 2.7 and pylint-django 0.7.2 for linting my django code. pylint --load-plugins pylint_django [..other options..] <path_to_your_sources> I didn't understand...

Show Detail

PyLint failing for a number of Django imports

I am using PyLint, pylint -e app/views.py Gives me errors like E: 3: No name 'shortcuts' in module 'django' E: 7: No name 'db' in module 'django' But passes for other django

Show Detail