diff --git a/app/templates/file_info.html b/app/templates/file_info.html index 06794ab..9ca2665 100644 --- a/app/templates/file_info.html +++ b/app/templates/file_info.html @@ -6,7 +6,7 @@ {{outcome.fileInfo.name}} Size: - {{outcome.fileInfo.size}} bytes + {{outcome.fileInfo.size|prettynumber}} bytes Type: {{outcome.fileInfo.ident}} diff --git a/app/templates/file_matches.html b/app/templates/file_matches.html index 7d56b11..416e163 100644 --- a/app/templates/file_matches.html +++ b/app/templates/file_matches.html @@ -12,7 +12,7 @@ {% endfor %} diff --git a/app/templates/list_files_results.html b/app/templates/list_files_results.html index 51e48f7..4d3e9ba 100644 --- a/app/templates/list_files_results.html +++ b/app/templates/list_files_results.html @@ -26,7 +26,7 @@ {% endif %} - {{outcome.fileInfo.size}} + {{outcome.fileInfo.size|prettynumber}} {{outcome.fileInfo.ident}} {{outcome.matches|length}} diff --git a/app/views.py b/app/views.py index 36aa531..4a262d4 100644 --- a/app/views.py +++ b/app/views.py @@ -272,4 +272,8 @@ def hex_filter(s): @views.app_template_filter('mydate') def date_filter(s): - return s.strftime('%Y-%m-%d %H:%M:%S') \ No newline at end of file + return s.strftime('%Y-%m-%d %H:%M:%S') + +@views.app_template_filter('prettynumber') +def date_filter(s): + return f"{s:,}"