Hi Greg,

Within the view you can just use python's built in round function

>>> round(92.5698,2)
92.57

The full documentation is here:

http://docs.python.org/lib/built-in-funcs.html

Look for the "round()" function - the second argument is the number of
decimal places you wish to retain.

Hope that helps.

On Oct 15, 11:06 pm, Greg <[EMAIL PROTECTED]> wrote:
> Hello,
> I have a view that gets a number.  It's value is 92.5698,  I want to
> find out how to convert that number to two decimal places 92.57 from
> within the 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 django-users@googlegroups.com
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