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 linters.sh in your project root (next to manage.py):
flake8 --config=./linter.config .
Make sure this file is executable:
$ chmod +x linters.sh
Now create a config file linters.config in your project root:
Where yourproject should be replaced with your projectname.
To execute the linter script: