Plugin to catch bad style specific to Django Projects
Project description
flake8-django
A flake8 plugin for 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 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 |
Licence
GPL
Thanks
@stummjr for teaching me AST, and what I could do with it. His blog is cool.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8-django-0.0.2.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file flake8-django-0.0.2.tar.gz
.
File metadata
- Download URL: flake8-django-0.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27a44fe8f438468f2a5d7f453c7eb49850e64ba814975298140b7de9b4864e5 |
|
MD5 | 272e30d7a58da55d4352b96e2ede107c |
|
BLAKE2b-256 | 0d7c36d021e8e306fdbd722b8bf01ff7b4b4836367e3448291b88767437a6c58 |
Provenance
File details
Details for the file flake8_django-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: flake8_django-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d1acda4220e7ad53c2290fbe21cfccbb1d1604ddc048429d63d84e22707a6f |
|
MD5 | fb6acb5be16271909024e1401a0768ba |
|
BLAKE2b-256 | 7623a4ba06c0ac9f41f8df972657de386e871223a348cd7bead5e9a02dcfc0cb |