Answer the question
In order to leave comments, you need to log in
How to display html in text contained in model fields in Django?
I have a candidate model. Each candidate has a bio field, I want the HTML that is written in this field to be displayed on the page.
For example, if the field contains:
<h1>Моя жизнь</h1>
Родился я в небольшом городе...
<h1>Мои суперспособности</h1>
<ul>
<li>Читаю мысли</li>
<li>Умею летать</li>
</ul>
class Candidat(models.Model):
name = models.CharField(max_length=20)
surname = models.CharField(max_length=20)
father_name = models.CharField(max_length=20)
bio = models.TextField()
form = models.CharField(max_length=10)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question