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=.
Warning | Description |
---|---|
DJ01 |
Using null=True is not recommended for some of the Django ORM fields. E.g. CharField , EmailField , ImageField , FileField , UUIDField , SlugField , TextField |
DJ02 |
Using blank=True is not recommended on BooleanField |
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 |
GPL
@stummjr for teaching me AST, and what I could do with it. His blog is cool.