Revision 4f3fc663 snf-astakos-app/astakos/im/templatetags/filters.py

b/snf-astakos-app/astakos/im/templatetags/filters.py
170 170
        exponent = min(int(log(num, 1024)), len(unit_list) - 1)
171 171
        quotient = float(num) / 1024**exponent
172 172
        unit, num_decimals = unit_list[exponent]
173
        format_string = '{:.%sf} {0}' % (num_decimals)
173
        format_string = '{0:.%sf} {1}' % (num_decimals)
174 174
        return format_string.format(quotient, unit)
175 175
    if num == 0:
176 176
        return '0 bytes'
177 177
    if num == 1:
178 178
        return '1 byte'
179 179
    else:
180
       return '';
180
       return '';

Also available in: Unified diff