From 1a14050ef2464569b55cfbc70ce255d7045cd8fb Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 29 Sep 2022 12:11:13 +0200 Subject: [PATCH] misc: add djhtml files/notes (#69422) --- .git-blame-ignore-revs | 2 ++ .pre-commit-config.yaml | 5 +++++ README | 10 +++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index d2a74d27..389898cc 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -2,3 +2,5 @@ 2bf37aaa7e459d429fca284f2de60add5841d063 # trivial: apply isort (#55470) 0f75316e1b9a70e311d2971e75b32f84b00f487a +# misc: apply djhtml (#69422) +26c238261585ce358808b562e10b39c67cfe7f3e diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8125b5a0..4f7f1edc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,11 @@ repos: hooks: - id: isort args: ['--profile', 'black', '--line-length', '110'] +- repo: https://github.com/rtts/djhtml + rev: 'v1.5.2' + hooks: + - id: djhtml + args: ['--tabwidth', '2'] - repo: https://git.entrouvert.org/pre-commit-debian.git rev: v0.1 hooks: diff --git a/README b/README index 044b90c5..9377cf25 100644 --- a/README +++ b/README @@ -23,9 +23,13 @@ Similarly, isort is used for imports, using these parameters: isort --profile black --line-length 110 -There is .pre-commit-config.yaml to use pre-commit to automatically run black -and isort before commits. (execute `pre-commit install` to install the git -hook.) +djhtml is used to automatically indent html files, using those parameters: + + django-upgrade --tabwidth 2 + +There is .pre-commit-config.yaml to use pre-commit to automatically run black, +isort and djhtml before commits. (execute `pre-commit install` to install the +git hook.) License