Skip to content

Commit 89c54a9

Browse files
committed
Add djlint options to pyproject.toml
1 parent 8506c2b commit 89c54a9

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.djlint_rules.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,12 @@ ignore_errors = true
112112
[tool.djlint]
113113
ignore = "H023,T003,H006,H031,D018,H021,H025"
114114
profile = "django"
115+
116+
[tool.djlint.rule]
117+
name = "D034"
118+
message = ".pk or .id should only be used with \"|unlocalize\""
119+
flags = "re.DOTALL|re.I"
120+
patterns = [
121+
'{{\s*[a-zA-Z0-9_.]+\.pk\s*}}',
122+
'{{\s*[a-zA-Z0-9_.]+\.id\s*}}',
123+
]

0 commit comments

Comments
 (0)