feat: derive event lifecycle status from dates and flags
Replace persisted event statuses with publication and cancellation flags, and compute public lifecycle labels from event timing and registration capacity. Keep filters, registration checks, and profile responses aligned with the derived status.
This commit is contained in:
@@ -15,7 +15,7 @@ class TestEventModelTests:
|
||||
|
||||
def setup_method(self):
|
||||
now = timezone.now()
|
||||
self.event = Event.objects.create(title='Workshop', description='**Important** details', start_time=now + timedelta(days=1), end_time=now + timedelta(days=1, hours=2), capacity=1, registration_start_date=now - timedelta(days=1), registration_end_date=now + timedelta(hours=1))
|
||||
self.event = Event.objects.create(title='Workshop', description='**Important** details', start_time=now + timedelta(days=1), end_time=now + timedelta(days=1, hours=2), capacity=1, registration_start_date=now - timedelta(days=1), registration_end_date=now + timedelta(hours=1), is_published=True)
|
||||
self.user = User.objects.create_user(username='attendee', mobile='09191110003', password='password')
|
||||
|
||||
def test_markdown_description_and_registration_window_remain_available(self):
|
||||
|
||||
Reference in New Issue
Block a user