mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Suppression de l'historique
This commit is contained in:
parent
2524c09e8e
commit
cbd85ff0eb
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from users.models import User, School, Adherent, Club
|
from users.models import User, School, Adherent, Club
|
||||||
from machines.models import Domain, Machine
|
from machines.models import Domain, Machine
|
||||||
|
from reversion.models import Revision
|
||||||
from django.db.models import F, Value
|
from django.db.models import F, Value
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.db.models.functions import Concat
|
from django.db.models.functions import Concat
|
||||||
|
@ -87,6 +88,10 @@ class Command(BaseCommand):
|
||||||
u.update(password = makeSecret(password))
|
u.update(password = makeSecret(password))
|
||||||
self.stdout.write(self.style.SUCCESS('done...'))
|
self.stdout.write(self.style.SUCCESS('done...'))
|
||||||
|
|
||||||
|
self.stdout.write('Suppression de l\'historique (This may take some time)')
|
||||||
|
Revision.objects.all().delete()
|
||||||
|
self.stdout.write(self.style.SUCCESS('done...'))
|
||||||
|
|
||||||
self.stdout.write("Data anonymized!")
|
self.stdout.write("Data anonymized!")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue