K
K
Kamo Petrosyan2016-04-20 02:09:16
Django
Kamo Petrosyan, 2016-04-20 02:09:16

How to escape curly braces { in Django templates?

It's embarrassing to admit, but I haven't found a solution yet.
In the template I use JS insert
q={{{q}}}
This is from ajax-bootstrap-autocomplete
Naturally, the template engine treats {{{q}}} as a variable {q}
How, actually, to get out of the situation without outputting the code to a separate js file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
marazmiki, 2016-04-20
@Haikson

Verbatim

I
iegor, 2016-04-20
@iegor

https://docs.djangoproject.com/en/1.9/ref/template...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question