skillfed

pylint-django

A Pylint plugin to help Pylint understand the Django web framework

pylint-django v2.8.0 2.3M downloads/30d#3,158 on PyPI622
Copyleft license Active released

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-django

uv

uv add pylint-django

poetry

poetry add pylint-django

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Django :: 2.2Framework :: Django :: 3Framework :: Django :: 3.0Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)Operating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Quality Assurance

Tags

pylint django plugindjango code lintingdjango static analysispylint django integrationdjango model attribute checkingdjango foreignkey lintingpylint django warnings
djangolintingcode-quality

More Quality Assurance packages