Plugin to catch bad style specific to Django Projects.
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install flake8-djangoflake8-django
A flake8 plugin to detect bad practices on Django projects.
Installation
Install from pip with:
$ pip install flake8-django
Testing
flake8-django uses pytest for tests. To run them use:
$ pytest
Run coverage report using:
$ pytest --cov=.
List of Rules
| Rule | Description |
|---|---|
DJ01 | Avoid using null=True on string-based fields such as CharField and TextField |
DJ03 | Avoid passing locals() as context to a render function |
DJ06 | Do not use exclude with ModelForm, use fields instead |
DJ07 | Do not use __all__ with ModelForm, use fields instead |
DJ08 | Model does not define __str__ method |