Can I generate HTML dynamically based on DJANGO-POLYMORPHIC Models? I'd like to read all of the rows from a table and generate divs based on the class type. Or is this bad practice?
{% if content %}
{% for c in content %}
<ul>
{% if c.instance_of(Text) %}
<li>TEXT</li>
{% endif %}
{% if c.instance_of(Image) %}
<li>IMAGE</li>
{% endif %}
</ul>
{% endfor %}
{% else %}
<p>No content available.</p>
{% endif %}