{# Construct the category path #}
Category/
{% for path_item in category.parentpath %}
{{ path_item.name }}/
{% endfor %}
{{ category.name }}
Children:
{% for child in children %}
{{ child.name }}
{% endfor %}
Parts:
{% for part in category.part_set.all %}
{{ part.name }}
{% endfor %}