Skip to content

Commit

Permalink
Changed storage report to provide storage in bytes.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlundberg committed Oct 24, 2014
1 parent 87deafa commit ef2c694
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions meetingtools/apps/content/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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()

0 comments on commit ef2c694

Please sign in to comment.