flake8-django
Plugin to catch bad style specific to Django Projects.
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you maintain a Django project and want automated enforcement of Django-specific style rules integrated into flake8. The plugin is stable and has no known vulnerabilities, but maintenance is dormant; verify that its rules remain compatible with your Django version before adopting. The copyleft GPL-3.0-or-later license requires compliance if you redistribute or modify the plugin itself, but using it as a development tool typically poses no constraint.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires flake8 and astroid as runtime dependencies; requires Python >=3.7.2,<4.0.0.
- High install friction due to two runtime dependencies.
- Maintenance is dormant—last release was 2023-07-31, though the repository remains unarchived with 180 stars.
License · maintenance · safety
GPL-3.0-or-later (copyleft) — Licensed under GPL-3.0-or-later (copyleft). Any project using this plugin must comply with GPLv3+ terms; proprietary or closed-source projects may face licensing constraints.
last release 2023-07-31 (1110 days) · last repo commit 2024-02-09 · 180 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 87,636 downloads/mo, #13,779 on PyPI
Alternatives
Verify before relying
pip install flake8-django
Then run flake8 on your Django project:
flake8 --select=E,F,W,C90,DJ your_django_app/
Or enable optional rules like DJ10:
flake8 --select=E,F,W,C90,DJ,DJ10 your_django_app/- Whether dormant maintenance status affects compatibility with recent Django versions.
- Whether all seven core rules (DJ01, DJ03, DJ06, DJ07, DJ08, DJ12, DJ13) and two optional rules (DJ10, DJ11) remain effective for current Django codebases.
What it is and what it does
flake8-django is a linter plugin that integrates Django-specific style checks into the flake8 framework. It enforces a set of rules designed to catch common Django anti-patterns and style violations—for example, flagging null=True on string fields, discouraging locals() in render contexts, and ensuring models define __str__ methods. The plugin works by analyzing your Django code's abstract syntax tree using astroid, then reporting violations as flake8 errors.
You install it alongside flake8, then run flake8 normally; it automatically applies its Django rules to your codebase. Seven rules are enabled by default (DJ01, DJ03, DJ06, DJ07, DJ08, DJ12, DJ13), and two optional rules (DJ10, DJ11) can be enabled via flake8 configuration. It's intended for teams enforcing Django style consistency across a project.
Use it for
- Enforce consistent Django model field definitions across a team by catching null=True on CharField/TextField.
- Catch ModelForm misconfigurations (exclude vs. fields, __all__ usage) during code review.
- Ensure all Django models define __str__ methods for better debugging and admin interface display.
- Validate that @receiver decorators are placed correctly at the top of other decorators.
- Enforce Django Style Guide compliance for model inner class and method ordering.
- Integrate Django linting into CI/CD pipelines to catch style violations before merge.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you maintain a Django project and want automated enforcement of Django-specific style rules integrated into flake8. The plugin is stable and has no known vulnerabilities, but maintenance is dormant; verify that its rules remain compatible with your Django version before adopting. The copyleft GPL-3.0-or-later license requires compliance if you redistribute or modify the plugin itself, but using it as a development tool typically poses no constraint.
Install
flake8-django on PyPI
Before you install
High install friction due to two runtime dependencies. Maintenance is dormant—last release was 2023-07-31, though the repository remains unarchived with 180 stars.
Requires flake8 and astroid as runtime dependencies; requires Python >=3.7.2,<4.0.0.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any project using this plugin must comply with GPLv3+ terms; proprietary or closed-source projects may face licensing constraints.
Quickstart
pip install flake8-django
Then run flake8 on your Django project:
flake8 --select=E,F,W,C90,DJ your_django_app/
Or enable optional rules like DJ10:
flake8 --select=E,F,W,C90,DJ,DJ10 your_django_app/
Verify before relying
- Whether dormant maintenance status affects compatibility with recent Django versions.
- Whether all seven core rules (DJ01, DJ03, DJ06, DJ07, DJ08, DJ12, DJ13) and two optional rules (DJ10, DJ11) remain effective for current Django codebases.
Package facts
| License | GPL-3.0-or-later copyleft |
| Python support | Supports the current Python release >=3.7.2,<4.0.0 |
| Install friction | High. Source build required |
| Runtime dependencies | 2 packagesastroidflake8 |
| Maintenance | Dormant 1,110 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,636 / month, #13,779 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: Flake8License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_django-1.4.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django code style linter”
- flake8-djangoA flake8 plugin that detects Django-specific code style violations…
- djadeDjade is a command-line formatter for Django template syntax, built…
- djlintdjlint formats and lints HTML templates with embedded template syntax…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also flake8_simplify · wemake-python-styleguide · flake8-html · flake8-logging · flake8-quotes · flake8-annotations · flake8-black · flake8 · flake8-logging-format · flake8-bandit