Adding flake8 to your Django project

Let's add some flake8 to your Django project.What is flake8? It's a tool that will check all your Python files for correct syntax, pep8 and complexity.

First install flake8 like so:

$ pip install flake8==2.1.0

Now create a file named in your project root (next to

flake8 --config=./linter.config .

Make sure this file is executable:

$ chmod +x

Now create a config file linters.config in your project root:


Where yourproject should be replaced with your projectname.

To execute the linter script:

$ ./