From ef2c694c37ae00081913866dc9d12d26718264af Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Fri, 24 Oct 2014 13:04:10 +0200 Subject: Changed storage report to provide storage in bytes. --- meetingtools/apps/content/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meetingtools/apps/content/views.py b/meetingtools/apps/content/views.py index 9ccd7fe..992aee2 100644 --- a/meetingtools/apps/content/views.py +++ b/meetingtools/apps/content/views.py @@ -83,10 +83,10 @@ def cluster_report(request, cluster_name): data.append({ 'domain': item['domain'], 'number_of_files': item['number_of_files'], - 'storage_used': filesizeformat(item['domain_bytes']), + 'storage_used (B)': item['domain_bytes'], 'percent': '{0:0.2g}%'.format(int(round(percent))) }) - return dicts_to_csv_response(data, header=['domain', 'number_of_files', 'storage_used', 'percent']) + return dicts_to_csv_response(data, header=['domain', 'number_of_files', 'storage_used (B)', 'percent']) return HttpResponseForbidden() @@ -103,8 +103,8 @@ def domain_report(request, domain_name): data.append({ 'username': item['username'], 'number_of_files': item['number_of_files'], - 'storage_used': filesizeformat(item['bytecount']), + 'storage_used (B)': item['bytecount'], 'percent': '{0:0.2g}%'.format(int(round(percent))) }) - return dicts_to_csv_response(data, header=['username', 'number_of_files', 'storage_used', 'percent']) + return dicts_to_csv_response(data, header=['username', 'number_of_files', 'storage_used (B)', 'percent']) return HttpResponseForbidden() -- cgit v1.1