Diverse Code Cleanups
*Code wurde PEP-8 gerecht formatiert * Kleine Fehler die der PyCharm Inspector beanstandet wurden korrigiert
This commit is contained in:
committed by
Christian Berg
parent
f34281089d
commit
86a0db050d
@@ -1,15 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user