To keep it short & sweet:
I'm pulling a sum from a DB which is a decimal value. I'm trying to use that value in a JSON result json.dumps( { 'sum': amount } ) #where amount is my Decimal
Django can't serialize the Decimal. I can convert it to a string, but I'd like a numeric type within the js If I try and convert it to a float I end up with more than 2 decimal places.
What needs to happen, if possible, to get a result like? { 'sum': 500.50 }
ty