Re: python/django/vs code

2024-06-06 Thread Bhagyashri Phalake
Calculate Total Sales in View from django.shortcuts import render from .models import Sale def sales_report(request): sales = Sale.objects.all() total_sales = sales.aggregate(total=models.Sum('total_price'))['total'] return render(request, 'sales_report.html', {'sales': sales, 'to

Re: Merging results of two .html files show up in one web page

2024-06-06 Thread Bhagyashri Phalake
total sale from django.shortcuts import render from .models import Sale def sales_report(request): sales = Sale.objects.all() total_sales = sales.aggregate(total=models.Sum('total_price'))['total'] return render(request, 'sales_report.html', {'sales': sales, 'total_sales': total_sa

[no subject]

2024-06-06 Thread Siphiwe Nyathi
Good day I am struggling with the following task, may you please assist? bellow are the instructions: [image: image.png] Kind Regards, Siphiwe Nyathi -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece