Opened 18 years ago
Closed 18 years ago
#2466 closed enhancement (invalid)
[patch] Add a 'filesize' filter to the 'humanize' template tags
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Contrib apps | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This patch adds a new filter 'filesize', which is meant to take in values from the get_XXX_size method of FileFields.
This will return the filesize in a human-friendly format. For example:
1) 654392 would be returned as "543.39KB"
2) 1926876 would be returned as "1.92MB"
3) 1827381726 would be returned as "1.83GB"
Attachments (1)
Change History (2)
by , 18 years ago
Attachment: | filesize.diff added |
---|
comment:1 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
This already exists as 'filesizeformat'
Note:
See TracTickets
for help on using tickets.
[patch] Patch for ticket