emp = Employee.objects.filter(id=1)
Persons = Employee.objects.extra(select={'difference':(emp.values_list("Salary",flat=True)[0]-float('Salary'))})
But it give Error :
Exception Type: ValueError
Exception Value:could not convert string to float: 'Salary'.
How can i solve this Error.
Aucun commentaire:
Enregistrer un commentaire