help = "Delete expired service tickets from the database"
def handle_noargs(self, **options):
help = "Delete expired service tickets from the database"
def handle_noargs(self, **options):
tickets = ServiceTicket.objects.all()
for ticket in tickets:
expiration = datetime.timedelta(minutes=settings.CAS_TICKET_EXPIRATION)
if datetime.datetime.now() > ticket.created + expiration:
tickets = ServiceTicket.objects.all()
for ticket in tickets:
expiration = datetime.timedelta(minutes=settings.CAS_TICKET_EXPIRATION)
if datetime.datetime.now() > ticket.created + expiration:
for ticket in tickets:
expiration = datetime.timedelta(minutes=settings.CAS_TICKET_EXPIRATION)
if datetime.datetime.now() > ticket.created + expiration:
for ticket in tickets:
expiration = datetime.timedelta(minutes=settings.CAS_TICKET_EXPIRATION)
if datetime.datetime.now() > ticket.created + expiration: