Answer the question
In order to leave comments, you need to log in
How to pass html-css to a block in Django?
Guys, hello.
Task: I fill in the django admin panel a TextField cell, in which I specify a large text (about 2000 characters) and pass it to the template through the following command:
{% block maincontent %}
{{ stepfieldst.main_text }}
{% endblock %}
{% block maincontent %}
<h1>{{ stepfieldst.main_text_title }}</h1>
<p>{{ stepfieldst.main_text_filed}}<p>
# и так далее
{% endblock %}
Answer the question
In order to leave comments, you need to log in
If I try to immediately insert text from html markup into the TextField, I get this thing:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question