UPD: added app to submit participant registrations.
This commit is contained in:
13
dav_registration/utils.py
Normal file
13
dav_registration/utils.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
from django.utils import timezone
|
||||
|
||||
from .models import Registration
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def purge_registrations():
|
||||
now = timezone.now()
|
||||
for r in Registration.objects.filter(purge_at__lte=now):
|
||||
logger.info('Purge registration \'%s\'', r)
|
||||
r.delete()
|
||||
Reference in New Issue
Block a user