feat: add is_featured/is_top_event fields and API endpoints

- Event model: added is_featured, is_top_event BooleanFields
- Migration 0007 applied to DB
- EventForm: checkboxes for both new fields
- EventAdmin: list_display, list_editable, list_filter for both flags
- FeaturedEventsAPI: POST /api/events/featured-events/ -> is_featured=True events
- TopEventsAPI: POST /api/events/top-events/ -> is_top_event=True events
This commit is contained in:
Ubuntu
2026-03-24 12:20:34 +00:00
parent b54439a4c2
commit aaaab190da
6 changed files with 88 additions and 7 deletions

View File

@@ -54,6 +54,9 @@ class Event(models.Model):
('community', 'Community'),
])
is_featured = models.BooleanField(default=False, help_text='Show this event in the featured section')
is_top_event = models.BooleanField(default=False, help_text='Show this event in the Top Events section')
def __str__(self):
return f"{self.name} ({self.start_date})"