Show blocks as a sorted list

main
Bob Mottram 2022-06-05 11:46:27 +01:00
parent bf08f64d87
commit 33ba88b10b
1 changed files with 5 additions and 1 deletions

View File

@ -395,7 +395,11 @@ def html_moderation_info(css_cache: {}, translate: {},
blocking_filename = base_dir + '/accounts/blocking.txt'
if os.path.isfile(blocking_filename):
with open(blocking_filename, 'r') as fp_block:
blocked_str = fp_block.read()
blocked_lines = fp_block.readlines().sort()
blocked_str = ''
for line in blocked_lines:
line = line.replace('\n', '').replace('\r', '').strip()
blocked_str += line + '\n'
info_form += '<div class="container">\n'
info_form += \
' <br><b>' + \