help="Anonymize the data in the database in order to use them on critical servers (dev, personnal...). Every information will be overwritten using non-personnal informations. This script must follow any modification of the database.\nOptionnal argument: {id|id|id|...} to exclude users from anonymisation"

help="Anonymise the data in the database in order to use them on critical servers (dev, personal...). Every information will be overwritten using non-personal information. This script must follow any modification of the database.\nOptional argument: {id|id|id|...} to exclude users from anonymisation."

defadd_arguments(self,parser):

parser.add_argument("user_id",nargs="+",type=int,help="User ID")

...

...

@@ -22,14 +22,14 @@ class Command(BaseCommand):

users_ids=kwargs["user_id"]

foruser_idinusers_ids:

self.stdout.write(

"User: {} will not be anonymised".format(

"User: {} will not be anonymised.".format(

User.objects.filter(id=user_id).get().name

)

)

self.stdout.write(

self.style.WARNING(

"\nDISCLAIMER\nThis function will make your database unusable for production. Are you sure you want to run this ?(doit): "

"\nDISCLAIMER\nThis function will make your database unusable for production. Are you sure you want to run this? (doit): "