{% extends "mag/base_mag_ecom.html" %} {% load static %} {% block title %}AUTO-PIECE — Catégories{% endblock title %} {% block page %}Catégories{% endblock page %} {% block extra_head %} {% endblock extra_head %} {% block page_action_buttons %} Modèle Excel
{% csrf_token %}
{% endblock page_action_buttons %} {% block main_content %}

Liste des categories

    {% for c in categories %}
  • {% if c.image.url %} {% endif %}
    {{c.categorie}} {% if c.actif %} Active {% else %} Inactive {% endif %} {{ c.total_quantite|default:0 }} pièces

    {{c.description}}

    {% for sc in c.sous_categories.all %} {{ sc.nom }} {% empty %} Aucune sous-catégorie {% endfor %}
    {{c.cid}}
  • {% endfor %}
{% if categories %} {% for c in categories %} {% include "mag/partials/_edit_categorie_piece.html" with categorie=c edit_form=edit_form %} {% for sc in c.sous_categories.all %} {% include "mag/partials/_edit_sous_categorie.html" with sous=sc categories=categories %} {% endfor %} {% endfor %} {% endif %}
{% endblock main_content %}