[Fixed]-Convert to Excel with Django

1👍

You can for instance do this:

calculations_list = Calculations.objects.filter(user=request.user) \
                    .values_list('make', 'model', 'first_registration', 'body', 'facelift',
                                'engine', 'transmission', 'mileage',
                                'customer__firstname', 'customer__lastname', 'customer__email') \
                    .annotate(purchase_price=F('purchase_price')*1.21)
                    .order_by('-id')
👤albar

Leave a comment