Hello,
I have the following code:

///

b = Choice.objects.filter(choice=a.collection.id)
    for cb in b:
        discount_price = cb.price.name * Decimal(str(.75))
        cb.price.name = discount_price
        assert False, cb.price.name

///

Basically I'm just decreasing my price by 25%.  However, when I do
this my new value contains 4 decimal places.  37.5000 or 135.0000.
What do I need to do to only show 2 decimal places.  I know how to do
it in my template.  But I need to be able to do this in my view.

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to