Just thought I might share a size converter I wrote a while back...
def bytesToHumanReadable(bytes, binary=True, precision=1):
"""Convert bytes to a human-readable size.
Given a size in bytes, this function converts it and uses the
largest
suffix possible that does not result in a siz
Oh jeez, I just noticed the 'filesizeformat' filter...
Well, there's 5 minutes of my life I'll never get back :)
Jay P.
On 8/1/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> I just added a patch (http://code.djangoproject.com/ticket/2466) that
> adds a 'filesize' filter, which returns filesizes (f
I just added a patch (http://code.djangoproject.com/ticket/2466) that
adds a 'filesize' filter, which returns filesizes (from get_XXX_size)
in a human friendly way.
It's trivially simple, but I thought it might be useful to others.
Jay P.
--~--~-~--~~~---~--~~
Y