Add a kind of trashbin for registrations and participants
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2020-12-03 11:47:41 +01:00
parent f2f0df3ab3
commit 94595f4785
13 changed files with 484 additions and 93 deletions

View File

@@ -1,7 +1,7 @@
import logging
from django.utils import timezone
from .models import Participant
from .models import Participant, TrashedParticipant
logger = logging.getLogger(__name__)
@@ -11,3 +11,6 @@ def purge_participants():
for p in Participant.objects.filter(purge_at__lte=now):
logger.info('Purge participant \'%s\'', p)
p.delete()
for p in TrashedParticipant.objects.filter(purge_at__lte=now):
logger.info('Purge participant from trash \'%s\'', p)
p.delete()