1👍
✅
You can use the safe
filter. An example usage is:
{{course.description|safe|escape}}
You can read up about it here
0👍
You can’t do that because you are mixing server and client side execution. Django view code is executed in the server (so all the {{ value }}
tags are replaced with the respective values), and what is returned to the web browser is just HTML. Then the javascript code is executed in the context of the HTML generated.
So, if you want to use client-side templates like you have on Django you can use something like Handlebar.js, which has a similar syntax.
- [Answer]-Modified django form cleand_data do is not renedered in data
- [Answer]-Django + Openlayers GeoJSON not displaying
- [Answer]-Overriding ModelForm.save does not update all affected fields
- [Answer]-Django form posting does nothing
- [Answer]-How do I make my django application perform a job at a fixed time everyday?
Source:stackexchange.com