Hi Luke,

Take a look in satchmo_utils module, tons of helper methods for
truncating/rounding decimals, floats etc. Numbers.py would be a good
place to start. The method 'round_decimal()' looks like it might what
you want.

Cheers
Rick

On Apr 14, 5:18 pm, Luke <[email protected]> wrote:
> For the admin site product listing, I'd like to reduce the number of
> places after the decimal point for items_in_stock and price.  I'm
> already subclassing Product, so I was able to do it by writing a
> little method on the model:
>
>     def items_in_stock_rounded(self):
>         return int(self.items_in_stock)
>     items_in_stock_rounded.admin_order_field = 'items_in_stock'
>     items_in_stock_rounded.short_description = 'items in stock'
>
> But is there a more direct way?

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo 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/satchmo-users?hl=en.

Reply via email to