Find and fix Django mishaps.
Project description
django-doctor
Django code quality assistant. Offline version of https://django.doctor
Find and fix around 40 breaches of Django best practice - helping you build world-class websites, release faster, and reduce dev costs.
Installation
$ pip install django-doctor
Fix
Run the fix suggestion wizard like so:
$ django_doctor fix
This runs a simple server on http://localhost:9000 and opens the wizard in your browser:
You then accept or reject the suggestions
And ultimately the selected changes are saved to your file system
You can change the address:
$ django_doctor fix --address=0.0.0.0 --port=9001
Your virtual environment directory is automatically skipped. To exclude other directories use the --ignore
flag:
$ django_doctor fix --ignore=foo # single directory
$ django_doctor fix --ignore=foo --ignore=bar # multiple directories
You can also specify a directory to check instead of running on the current working directory. To run on only on "my_app" and "my_other_app":
$ django_doctor fix my_app my_other_app
Check
You can see suggested changes in your shell:
$ django_doctor check
Consider running this as a pre-commit hook, or on your CI to prevent new Django anti-patterns from being merged.
You can also use --ignore
the same as with the fix
command.
Configuration
You turn checks on/off with --disable
and --enable
. See here for the codenames of the checks.
Troubleshooting
Debugging
Try running django_doctor
in verbose mode by adding --log-level=debug
when executing the fix
or check
commands.
Parallelism
Django Doctor tries to speed up by creating a process per CPU. Your OS may not support this parallelism. To turn parallelism off specify --jobs=1
or change to any number you want.
Pipenv
If you're using pipenv
you may need to do pipenv install django-doctor --pre
because:
django-doctor
depends on blackblack
only releases pre-releasespipenv
ignores pre-releases
Support
Chat with us on https://django.doctor if you have any problems or have a feature request
GitHub integration
Django Doctor has GitHub integration. Learn more at https://django.doctor/github
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django_doctor-2.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fb890054d92858d32086319b29aacd2a208a0701bf08c0150415ea95521a347 |
|
MD5 | a3b137199cb1e372924929207b692cb0 |
|
BLAKE2b-256 | a016f325fee68d61bf9f40378c2303e6a2fdb71b0e175fbba373525e1d57a20f |
Hashes for django_doctor-2.4.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d187655029175849bbbec1dbe3c181fd1686e14201a12d9d76e25e218446001 |
|
MD5 | c191f6172ab9020a7ca9a3001558c47d |
|
BLAKE2b-256 | d560b3a1b0e091322072b39335a6d03f9d3fe6237dc6844f2c2874a8741f6336 |
Hashes for django_doctor-2.4.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a45e8719e907ca56aa70e6438a9183e24803f5a718e141073124c1b8853746e5 |
|
MD5 | 14371b591bad01f956e4676460521d53 |
|
BLAKE2b-256 | 466d40df9c739d3e550f5b26ffaebb12f8923cd24e1f71efefa41fdf3c7ba281 |
Hashes for django_doctor-2.4.0-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 316bda47c948f8a25eae56d8948a694b982dbdfc82f675a1abafc6f9ac16c40f |
|
MD5 | 8ba4a5f2d7300b74f44798497b8994e5 |
|
BLAKE2b-256 | 51ceb76a22d8e206d751a8a5574acd04dbcb1301f85743c027e7decb811e3575 |
Hashes for django_doctor-2.4.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e63f6306ae85ea73884b26320449c4243ba3c941edc05e7fb6ffec39c40372 |
|
MD5 | cebc3e3d3bf82f22ac8c47f73939633c |
|
BLAKE2b-256 | 17a92ec5a8a01a80ffcdc1a945ded489d300baac93d348d837e44e65ec17ac31 |
Hashes for django_doctor-2.4.0-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8430a1d89334fbe1039297a749dd261675e08fbeb3daeeff243758b811287bfc |
|
MD5 | 260faa839206c2015bd7d7eb4fbb04ab |
|
BLAKE2b-256 | d4b3d41deed8501b8cb8d6757a341eba7b7f5bc98a835687317e61731cf286de |
Hashes for django_doctor-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5febd31b3150602858570564a51b5674a1b2542095ee4b08bddd5c6c315209df |
|
MD5 | af9ba164f5fd939cf0394917761593ac |
|
BLAKE2b-256 | ed006071819afa87f545120db862f7ef1eff05155cb079b69055609448feea7b |
Hashes for django_doctor-2.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a244700cd081264afe841e9efe64d582a0ac410d1b6eeaa942327351b4f8f0d |
|
MD5 | a489fef87bf90c0104edcc436dc6ef55 |
|
BLAKE2b-256 | 53223f85d91754dd13a8db1df62685dbb1467e632e9989a26cd8fc556757b2b6 |
Hashes for django_doctor-2.4.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b8ff3734941064f9246b34149c15349b3f3a12602c05eaea0e3d89913000b2 |
|
MD5 | 93649391def33d2d222868c10683d379 |
|
BLAKE2b-256 | 8626cc4a8e1a30568647b4315b45782049042c7f4edcdcf41afb72f8fea41c6a |
Hashes for django_doctor-2.4.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11dff2d521ae708abe11f610eecf31aed8f44b0c4b9e362423af80b353f2e657 |
|
MD5 | 415bc63359763ebea24e0012f208375a |
|
BLAKE2b-256 | 165670e3c90d957079fd60fb8dcd3988b2bde07162efdcb24c1a540aa8fb85ef |
Hashes for django_doctor-2.4.0-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c18fc27ea13005968a4b63261901720bdc54b6fbd81285f05845f48a8da3303 |
|
MD5 | 3a8fb664eee3c38b59bad92f345231b8 |
|
BLAKE2b-256 | 60def9d4a98eadaec5b2758d0bc581487d81ae32acac5bf9c5ea91db965dafa9 |
Hashes for django_doctor-2.4.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb3fa4d244fd043ed44a17aa94fe0ab4546ebbd89c25d82b95da36a739553c69 |
|
MD5 | f502e59f0b857ff813d614994529e085 |
|
BLAKE2b-256 | 4256eae22dbe09006752a799fd823b5c3a88e22d3b15780ee6abc1b35ec20854 |
Hashes for django_doctor-2.4.0-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70035cf8a1a5e675915269e7e6122eb5c8212440701edc11128ac3030df8a29f |
|
MD5 | a75ffe4f768eee5b5f50c756371ac4ad |
|
BLAKE2b-256 | 1df367d8d64bd67427ef3cfad6477e3e324d0132f50b55cd2df79a2207fbc5ff |
Hashes for django_doctor-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97085182f06f50b4a4e3e8c839b084ef564c83e357b66c991988b7aefe7b27e |
|
MD5 | 6b6c2086c5a5ef327fb2b9e64ddb7e81 |
|
BLAKE2b-256 | 6c53e2091cd2479b34356294e653488b360149719a1491099fb8f1ce894cb846 |
Hashes for django_doctor-2.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c19bee8097b617ec77551a0f03636dfc0f336d13783f062447d33c4dc0d4f8e4 |
|
MD5 | a3c12f622c88c033808107f59fc4f3fe |
|
BLAKE2b-256 | d5388d7a52938ffed0f768d48e6b7455df2022c9686f1b8b02d967a24ec96054 |
Hashes for django_doctor-2.4.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9955994226318986a86f3ec6a83c444658b0d6ad3200c19fe4d9ce92dd066fea |
|
MD5 | 250036bb279c33addaabef947331022e |
|
BLAKE2b-256 | 84d1ef74a09c461fcabb70111a25bd85fd081abbf767d2100835057bbbb237a3 |
Hashes for django_doctor-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee66525a846804bbe4a74b01065a3d0979be8516eaf8189e7da289cc895fce9 |
|
MD5 | 30ef4c6f106d6cfc4686b82ac1db13b8 |
|
BLAKE2b-256 | 12d460dab252e7371810b68b8c8d14ffe068e5e70c238f552d49fb9a0e869fa6 |
Hashes for django_doctor-2.4.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 420d26fe4247ef257651191a3c86a4bee8a50766ad766d07149f44ececf9a7a5 |
|
MD5 | 1242e9431e83953ed916ef3891fa84f1 |
|
BLAKE2b-256 | 903e03e87bb71e916ff645a72acbc8f02582829461f0fd01dd918838b20fba36 |
Hashes for django_doctor-2.4.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe28d4273c063573acc3afff3d13bf247ffce291745638572d590125f028b588 |
|
MD5 | 70ea424546c8094aa12a05296325f43f |
|
BLAKE2b-256 | 9a2ec80f9244a663909f0b41956b5f33eea1307ea40dc2cb929cb83b6749d732 |
Hashes for django_doctor-2.4.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f13f4695aa992b0d6c447b017377d5ca78c2481446accf25a458978c62efee |
|
MD5 | e22ea14927cd0711670254a3d4439a9c |
|
BLAKE2b-256 | 3b9ca4a94e457a47d34c1b86968857f55069bbf3cdfc038138a8ce6323221d4d |
Hashes for django_doctor-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a344615708e83f1950b6ab3b62913eb6c093b0e8d4494e10859c090245761f |
|
MD5 | 8e828ef971c99b9d8a4d6dd80df3db8e |
|
BLAKE2b-256 | 683d9e00528599cf1500fcb1ab59f0faded91510cebd140bb75525e2be233aef |
Hashes for django_doctor-2.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7b445983298037b216c189f96d2a6e5b83a5e3b3214a672e4050001935ad41 |
|
MD5 | acf384f70c337ebc71ff83ebb6b77929 |
|
BLAKE2b-256 | 7a20b30da4c5c038ad1c2570674eadeddc2ff05d14921b58e3af4151886f6177 |
Hashes for django_doctor-2.4.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8c7d95392387a3a31c03e241d4267150afe26b33429421f30bdf910b3af83a4 |
|
MD5 | 3ffb055683cdb5fa8f204a306e1297cd |
|
BLAKE2b-256 | d5520ddf5b3d5c2f611f6b086a4f26179fd38cce3873f372b6fb884067b199dc |
Hashes for django_doctor-2.4.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1163878dd2ea750fc2da60a503ce370990264f2d144f8011f338df9c70e7fba0 |
|
MD5 | de2a45b02cbf8a5f23cc260604e79aff |
|
BLAKE2b-256 | d1f17869d9b2bc234dcba88381c6ec417a3758a4fcbee56353ae4359de0513b7 |
Hashes for django_doctor-2.4.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c77a2abb25090938ee2b3320b6eb3fe0aae5fef040ef788c522a9490e0be776f |
|
MD5 | 75d45370940d3aa734f388312af6c894 |
|
BLAKE2b-256 | b7116da6c66e6e1bd04005eb266752a8d5603087f42ea34c510c559f8fcda4de |
Hashes for django_doctor-2.4.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 701ca598b42e16cb82011315afbed9fdbf79316cde6c6bd351927f4025833e0f |
|
MD5 | 7d8c1ae4c1ae098f3a76ec7da7e12467 |
|
BLAKE2b-256 | 39770ada4076a7b1b96fa25dfae083a45bc37fa5c11003ed2de94c5d23dd9732 |
Hashes for django_doctor-2.4.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9e3723c8a56f17aae57c40030167df80f6fcbe369ab22985b6d32df51604f19 |
|
MD5 | a7e6626260a63dffbdf6ac0f56f9b491 |
|
BLAKE2b-256 | 2ea39c5b23177c6d2fd3f13292f04f7258239631b5bebe1ecf09c2da94e6b98b |
Hashes for django_doctor-2.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f9c8420ed265415027a6aa045229e2a1fa4529d44ec57e3c2c42817ef49de3b |
|
MD5 | 6891f5338aa1c1558a402e43e9e4eb33 |
|
BLAKE2b-256 | 2aa6e8d7012b1aea4ee1e41c6560e393f6dc281519357b63a304fcaf55f3ed01 |