pylint-django
A Pylint plugin to help Pylint understand the Django web framework
What it is and what it does
pylint-django is a Pylint plugin that teaches Pylint how to understand Django's dynamic code patterns. When you run Pylint on Django projects, it normally complains about attributes that don't exist in the static code—like Model.objects or View.request—because Django creates them at runtime. This plugin suppresses those false positives and improves type inference for Django ORM fields, forms, and migrations.
You install it alongside Pylint and activate it by passing --load-plugins pylint_django to your linting command. For best results, you point it to your Django settings module so it can use Django's own machinery to resolve model references and understand your project structure. It also includes an optional migrations checker that flags potentially problematic patterns like adding fields with defaults to large tables.
Use it for:
- Linting a Django project without drowning in false positives about missing Model attributes and ORM field methods.
- Validating Django ModelForm and Model Meta classes without spurious warnings about informational-only attributes.
- Catching dangerous patterns in migrations, such as adding fields with defaults that could lock large tables during deployment.
- Integrating Django code quality checks into CI/CD pipelines via Prospector, which auto-detects and uses this plugin.
- Improving type inference for ForeignKey and other relational field attributes during static analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Pylint plugin that improves static analysis of Django code by understanding Django-specific patterns and suppressing false positives from Django's dynamic attribute generation.
Yes, if you use Pylint on Django projects. It eliminates a major source of noise (Django's dynamic attributes) and is actively maintained with no known vulnerabilities. The copyleft license (GPLv2+) is the only consideration—confirm it aligns with your project's licensing policy before adding it to a proprietary codebase.
Install
pylint-django on PyPI
pip
pip install pylint-djangouv
uv add pylint-djangopoetry
poetry add pylint-djangoInstalling pylint-django
Before you install
Low friction install with only two runtime dependencies (pylint and pylint-plugin-utils). Actively maintained with a release 34 days ago and recent commits. Django itself is not installed by default to avoid environment conflicts; install with [with-django] extra if needed.
License in practice
Licensed under GPLv2 or later (copyleft). Any code that imports and uses this plugin in a proprietary project must comply with copyleft obligations—consult your legal team if you have restrictions on GPL dependencies.
Quickstart
pip install pylint-django
DJANGO_SETTINGS_MODULE=your.app.settings pylint --load-plugins pylint_django <path_to_sources>
# Or with Django auto-installed:
pip install pylint-django[with-django]
Requires a Django settings module (via DJANGO_SETTINGS_MODULE env var or --django-settings-module flag) to access Django internals for accurate type inference; without it, linting is less accurate.
Verify before relying
- Whether the plugin works with Django versions newer than 5.2 or Python 3.14+ in practice despite classifier support.
- Performance impact of running pylint with this plugin on large codebases compared to baseline pylint.
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pylint, pylint-plugin-utils |
| Maintenance | actively maintained — 34 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,296,181/month — #3,158 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylint_django-2.8.0-py3-none-any.whl
Keywords: django, plugin, pylint
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
prospectorProspector aggregates multiple Python static…
copyleft · top 15,000 on PyPI
pylintPylint is a static code analyzer that checks…
copyleft · top 1,000 on PyPI
pylint-celeryA Pylint plugin that improves static analysis…
copyleft · top 15,000 on PyPI
pylint-flaskA Pylint plugin that resolves Flask extension…
copyleft · top 15,000 on PyPI
pylint-odooA Pylint plugin that adds Odoo-specific code…
agpl · top 15,000 on PyPI
pylint-plugin-utilsProvides utilities and helper functions for…
copyleft · top 5,000 on PyPI
pylint-pytestA Pylint plugin that suppresses false-positive…
permissive · top 15,000 on PyPI
pylint-pydanticA Pylint plugin that extends Pylint's…
copyleft · top 5,000 on PyPI
pylint-flask-sqlalchemyA Pylint plugin that suppresses false-positive…
copyleft · top 15,000 on PyPI
pylint-protobufA Pylint plugin that makes Pylint understand…
permissive · top 15,000 on PyPI