from django.shortcuts import render
from django.http import HttpResponse
from .models import Client

# Create your views here.
def list_client(request,pk):
    client=Client.objects.get(id=pk)
    commande=client.commande_set.all()
    total_commande=commande.count()
    context={'client':client, 'commande':commande,'total_commande':total_commande}
    return render(request, 'client/list_client.html',context)
