First commit
[django-cas-provider.git] / cas_provider / management / commands / .svn / text-base / cleanupregistration.py.svn-base
1 """
2 A management command which deletes expired accounts (e.g.,
3 accounts which signed up but never activated) from the database.
4
5 Calls ``RegistrationProfile.objects.delete_expired_users()``, which
6 contains the actual logic for determining which accounts are deleted.
7
8 """
9
10 from django.core.management.base import NoArgsCommand
11 from django.core.management.base import CommandError
12
13 from registration.models import RegistrationProfile
14
15
16 class Command(NoArgsCommand):
17     help = "Delete expired user registrations from the database"
18
19     def handle_noargs(self, **options):
20         RegistrationProfile.objects.delete_expired_users()