Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Linter] Linter still fails with D018 on url parameter with name = "action" if in anchor attribute. #1183

Open
3 tasks done
AdrianVollmer opened this issue Mar 11, 2025 · 0 comments
Labels
🔍 linter 🦠 bug Something isn't working

Comments

@AdrianVollmer
Copy link

System Info

  • OS: Debian Sid
  • Python Version (python --version): 3.13.2
  • djLint Version (djlint --version): 1.36.4
  • template language: django

Issue

The Linter complains with an error D018 1:0 (Django) Internal links should use the {% url ... %} pattern. if a anchor attribute has a django url with a parameter named "action".

Related: #755

How To Reproduce

Lint this

<a href="#" hx-post="{% url 'foo' action='bar' %}">Link</a>

Contents of djlint.toml/.djlintrc/pyproject.toml [tool.djlint]

empty

@AdrianVollmer AdrianVollmer added 🔍 linter 🦠 bug Something isn't working labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 linter 🦠 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant