from django.core.management.base import BaseCommand
from events.models import Event

class Command(BaseCommand):
  help = 'Updates event statuses based on current time'

  def  handle(self, *args, **options):
    events = Event.objects.all()
    for event in events:
      event.save() # Trigger the status update logic
    self.stdout.write('Successfully updated event statuses')