mirror of
https://gitlab.crans.org/bde/nk20-scripts
synced 2024-12-25 00:42:23 +00:00
Save the list of changed usernames and lost aliases
This commit is contained in:
parent
7479671b3f
commit
69c5c3bb36
@ -246,20 +246,7 @@ class Command(ImportCommand):
|
||||
filename = kwargs["save"]
|
||||
with open(filename, 'w') as fp:
|
||||
json.dump(MAP_IDBDE, fp, sort_keys=True, indent=2)
|
||||
|
||||
for pk_user, old_username, new_username in CHANGED_USERNAMES:
|
||||
user = User.objects.get(pk=pk_user)
|
||||
mail_text = render_to_string("scripts/unsupported_username.txt", dict(
|
||||
user=user,
|
||||
old_username=old_username,
|
||||
new_username=new_username,
|
||||
))
|
||||
user.email_user("Transition à la Note Kfet 2020 : pseudo non supporté", mail_text)
|
||||
|
||||
for pk_user, aliases_list in CHANGED_USERNAMES:
|
||||
user = User.objects.get(pk=pk_user)
|
||||
mail_text = render_to_string("scripts/deleted_aliases.txt", dict(
|
||||
user=user,
|
||||
aliases_list=aliases_list,
|
||||
))
|
||||
user.email_user("Transition à la Note Kfet 2020 : suppression d'alias", mail_text)
|
||||
with open(filename + ".changed-usernames", 'w') as fp:
|
||||
json.dump(CHANGED_USERNAMES, fp, sort_keys=True, indent=2)
|
||||
with open(filename + ".removed-aliases", 'w') as fp:
|
||||
json.dump(LOST_ALIASES, fp, sort_keys=True, indent=2)
|
||||
|
Loading…
Reference in New Issue
Block a user