Changeset a637ba1 in tailbone for tailbone/grids/core.py


Ignore:
Timestamp:
12/18/18 17:41:38 (13 months ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
5151e2d
Parents:
3e9fdba
Message:

Add 'percent' as field type for Form; fix rendering of 'percent' for Grid

these both now assume the value obtained will be a "typical" percentage
decimal, i.e. 0.30130 instead of 30.130

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/grids/core.py

    r3e9fdba ra637ba1  
    272272        if value is None:
    273273            return ""
    274         return "{:0.2f}".format(value)
     274        return "{:0.3f} %".format(value * 100)
    275275
    276276    def render_quantity(self, obj, column_name):
Note: See TracChangeset for help on using the changeset viewer.