{% extends parent %}
{% load static from staticfiles %}
{% block primary %}
{% if sites %}
<h2>Work Sites</h2>
{% for site in sites %}
<p><a href='/sites/#{{site.id}}' data-use-pjax>{{site.location.name}}</a></p>
{% endfor %}
{% endif %}
{% endblock %}
Output
None
Expected
- extends parent
- load static from staticfiles
- block primary
- if sites
%h2
Work Sites
- for site in sites
%p
%a{ 'href':'/sites/#{{site.id}}', data-use-pjax:'' }
{{site.location.name}}
Sorry I didn't make it clear, it only converts HTML, and not JINJA2/DJANGO-HTML templates to HAML. This is because I use BeautifulSoup for the parsing.
Input
Output
Expected