from django.core.management.base import BaseCommand
from exams.models import KCCard
from django.utils import timezone
class Command(BaseCommand):
    help = 'Schedules daily repetition drills for due KC cards'
    def handle(self, *args, **kwargs):
        due = KCCard.objects.filter(next_due_at__lte=timezone.now())
        print(f'Found {due.count()} cards due for review today.')
