Answer the question
In order to leave comments, you need to log in
How to "embed" a string that contains HTML tags into a template?
For example, there is a model
class Post(models.Model):
body = models.TextField()
"<p><strong>Hello, world</strong></p>"
<html>
<body>
{{ Post.body }}
</body>
</html>
<html>
<body>
<p><strong>Hello, world</strong></p>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
1 thousand
2 tyks
But on the "introduced" the brain is still breaking. What is the meaning behind this word? Now I understand how:
- I need to output a line, it outputs it. But I want to get in.
That is why no one reads Of. documentation?
https://docs.djangoproject.com/en/1.7/ref/template...
P/S In Russian
: djbook.ru/rel1.6/ref/templates/builtins.html
about that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question