from django.contrib import admin # noqa: F401
from .models import Categorie, Produit

@admin.register(Categorie)
class CategorieAdmin(admin.ModelAdmin):
    list_display = ('categorie',)
    search_fields = ('categorie',)

@admin.register(Produit)
class ProduitAdmin(admin.ModelAdmin):
    list_display = ('libelle', 'quantite_stock', 'conditionnement', 'seuil_pre_rupture', 'categorie')
    list_filter = ('categorie', 'conditionnement')
    search_fields = ('libelle',)
