estaba teniedo una duda acerca de si como escribir codigo html en python ya que cuando lo quiro pasar no puedo
{% extends 'encyclopedia/layout.html' %}
{% block title %}
{% endblock %}
{% block body %}
{{ lines }}
<form action="{% url 'wiki:edit' title %}" method="post">
{% csrf_token %}
<input type="hidden" name="q" value="{{ search }}">
<input type="submit" value="Edit Text">
</form>
{% endblock %}
En la variable lines tengo codigo html pero cuando voy al codigo fuente de mi pagina ocurre esto:
<h1>Python</h1>
<p></p>
<h1>Python</h1>
<p></p>
<h1>PythonPython is a programming language that can be used both for writing <strong>command-line scripts</strong> or building <strong>web applications</strong>.</h1>
<p></p>
¿Como puedo pasar el codigo sin que ocurra esto?