15 lines
367 B
Python
15 lines
367 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from membership.models import ActivationRequest
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = "Delete all expired user registrations from the database"
|
|
|
|
def handle(self, *args, **options):
|
|
for activation in ActivationRequest.objects.expired():
|
|
activation.user.delete()
|
|
|