Custom Snippets for Django Html Not Working #136
Replies: 2 comments 2 replies
-
The very first line should be |
Beta Was this translation helpful? Give feedback.
-
The first thing that stands out to me, you've used While I'm not sure if what file you are working with is correctly being identified with But this should be prefixed with a
Feel free to read them more on the snippets package. Hopefully this helps. Otherwise opening a proper issue on the |
Beta Was this translation helpful? Give feedback.
-
I wrote snipppets for HTML-> django project:
'text.html.django':
'autoescape':
'prefix': 'autoescape'
'body': '{% autoescape ${1:off} %}\n\t$2\n{% endautoescape %}'
'block':
'prefix': 'block'
'body': '{% block ${1:block_name} %}\n\t$2\n{% endblock %}'
'csrf':
'prefix': 'csrf'
'body': '{% csrf_token %}'
'extends':
'prefix': 'extends'
'body': '{% extends "${1:base_template}" %}'
'for':
'prefix': 'for'
'body': '{% for ${1:item} in ${2:sequence} %}\n\t$3\n{% endfor %}'
'if':
'prefix': 'if'
'body': '{% if ${1:condition} %}\n\t$2\n{% endif %}'
'ifelse':
'prefix': 'ifelse'
'body': '{% if ${1:condition} %}\n\t$2\n{% else %}\n\t$3\n{% endif %}'
'include':
'prefix': 'include'
'body': '{% include "${1:template_name}.html" %}'
'url':
'prefix': 'url'
'body': '{% url "${1:view_name}" ${2:arg1,arg2} %}'
but even after restarting the pulsar app:
It didn't work
Beta Was this translation helpful? Give feedback.
All reactions