On 30/04/11 08:47, Dan McGee wrote:
The correct solution to me would be: 1. add another custom tablesort ordering; see archweb.js for our current listing of them. http://projects.archlinux.org/archweb.git/tree/media/archweb.js#n5 2. Make the "attribute" template tag itself smarter and always return a smartly formatted string rather than the raw attribute value (or perhaps make a format_attribute filter or something). hopefully it depends more on types than on attribute names for what it does. E.g. dates go through the "date" filter, integer fields that end in "size" always get filesizeformat treatment, etc. Then the template won't change much at all. 3. ??? 4. Profit
Sounds very reasonable. I did however use another solution in place of (2), and added the formatting to the view. In my opinion, it's simpler and just as elegant. Can you please review my patch [1] and see if anything is amiss? Thanks. [1] http://ompldr.org/vOGhtOQ/0001-Add-filesizeformat-filter-to-sizes-in-reports...