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:
21
events/migrations/0007_add_is_featured_is_top_event.py
Normal file
21
events/migrations/0007_add_is_featured_is_top_event.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('events', '0006_alter_event_source'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='is_featured',
|
||||
field=models.BooleanField(default=False, help_text='Show this event in the featured section'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='is_top_event',
|
||||
field=models.BooleanField(default=False, help_text='Show this event in the Top Events section'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user