Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Plugin to catch bad style specific to Django Projects

Project description



A flake8 plugin for Django projects.


Install from pip with:

$ pip install flake8-django


flake8-django uses pytest for tests. To run them use:

$ pytest

Run coverage report using:

$ pytest --cov=.

List of warnings

Warning Description
DJ01 Using null=True is not recommended for some of the Django ORM fields. E.g. CharField, EmailField, ImageField, FileField, BooleanField, UUIDField, SlugField, TextField
DJ02 Using blank=True is not recommended on BooleanField, use NullBooleanField instead
DJ03 Using locals() in render function is not recommended, use explicit arguments
DJ04 Using dashes in url names is discouraged, use underscores instead
DJ05 URLs include() should set a namespace




@stummjr for teaching me AST, and what I could do with it. His blog is cool.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
flake8_django-0.0.3-py3.7.egg (34.2 kB) Copy SHA256 hash SHA256 Egg 3.7
flake8_django-0.0.3-py3-none-any.whl (18.3 kB) Copy SHA256 hash SHA256 Wheel py3
flake8-django-0.0.3.tar.gz (17.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page