junstyle / vscode-django-support

django formatter, highlight...
https://marketplace.visualstudio.com/items?itemName=junstyle.vscode-django-support
Apache License 2.0
4 stars 0 forks source link

Does not work in the href attribute #1

Open zamaev opened 1 year ago

zamaev commented 1 year ago

image image

junstyle commented 1 year ago

html attribute can only use {{ }}. not {% %}

ghost commented 1 year ago

how to disable this error?

scratchmex commented 1 year ago

how do we disable this errors? it is happening when doing alpine.js in the template also. Just want to have it formatted :/

loganmac commented 11 months ago

html attribute can only use {{ }}. not {% %}

I'd like to get this fixed. Do you mean that prettier doesn't allow Django's template tags in the html attributes? Because it isn't a constraint on the Django side, you can see them doing it here in the docs: https://docs.djangoproject.com/en/4.2/ref/templates/builtins/#static

junstyle commented 11 months ago

not about prettier. the plugin of prettier to format django doc required to do like that. the plugin is imperfect