0002-misc-add-djhtml-files-notes-69404.patch
.git-blame-ignore-revs | ||
---|---|---|
15 | 15 |
1ec4ad937602a52db6913e8ee9103fdb59be59f7 |
16 | 16 |
# misc: apply black 22.1.0 |
17 | 17 |
87e8203e0765948ecb8dd38b2fb3dc7195d561c9 |
18 |
# misc: apply djhtml (#69404) |
|
19 |
142e04bd807a28b1790146828dacd97cbf88b2dd |
.pre-commit-config.yaml | ||
---|---|---|
21 | 21 |
hooks: |
22 | 22 |
- id: django-upgrade |
23 | 23 |
args: ['--target-version', '2.2'] |
24 |
- repo: https://github.com/rtts/djhtml |
|
25 |
rev: 'v1.5.2' |
|
26 |
hooks: |
|
27 |
- id: djhtml |
|
28 |
args: ['--tabwidth', '2'] |
|
24 | 29 |
- repo: https://git.entrouvert.org/pre-commit-debian.git |
25 | 30 |
rev: v0.1 |
26 | 31 |
hooks: |
README | ||
---|---|---|
48 | 48 | |
49 | 49 |
django-upgrade --target-version 2.2 |
50 | 50 | |
51 |
djhtml is used to automatically indent html files, using those parameters: |
|
52 | ||
53 |
django-upgrade --tabwidth 2 |
|
54 | ||
51 | 55 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black, |
52 |
isort, pyupgrade and django-upgrade before commits. (execute `pre-commit install`
|
|
53 |
to install the git hook.) |
|
56 |
isort, pyupgrade, django-upgrade and djhtml before commits. (execute
|
|
57 |
`pre-commit install` to install the git hook.)
|
|
54 | 58 | |
55 | 59 | |
56 | 60 |
Tests |
57 |
- |