args['image'] = ImageArticle.objects.all()
// Treetable
$("table").treetable({
expandable: true,
initialState: "expanded",
expanderTemplate: "<a href='#'> </a>",
indent: 24,
column: 0
});
<table class="table">
{% for category in categorys %}
{% if category.is_leaf_node %}
<tr class="treegrid-{{ forloop.counter }}">
<td>{{ category.name }}</td>
</tr>
{% for product in category.get_products %}
<tr class="treegrid-{{ forloop.counter }} treegrid-parent-{{ forloop.counter }}">
<td>{{ product.title }}</td>
</tr>
{% endfor %}
{% endif %}
{% endfor %}
</table>