-
Notifications
You must be signed in to change notification settings - Fork 609
feat:inlinePanel nested #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat:inlinePanel nested #595
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a two-level nested InlinePanel structure to demonstrate and test Wagtail's nested InlinePanel functionality. The implementation adds new models for organizing location operating hours in a hierarchical structure where each day can contain multiple time slots.
- Introduces
LocationWeekDaySlotandLocationHourSlotmodels to create a nested InlinePanel structure - Adds a test script to verify and demonstrate the nested InlinePanel functionality
- Includes database migration to create the new models
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bakerydemo/locations/models.py | Adds two new models (LocationWeekDaySlot and LocationHourSlot) with ClusterableModel inheritance, ParentalKey relationships, and panel configurations for nested InlinePanel support. Updates LocationPage to include the new nested structure alongside the existing flat structure. |
| bakerydemo/locations/migrations/0009_locationweekdayslot_locationhourslot.py | Creates database tables for the new LocationWeekDaySlot and LocationHourSlot models with appropriate fields, relationships, and ordering configuration. |
| bakerydemo/test_nested_inline.py | Adds a test/demonstration script that queries and displays the nested InlinePanel structure, providing instructions for testing the feature in the admin interface. |
Comments suppressed due to low confidence (1)
bakerydemo/locations/models.py:270
- The new nested InlinePanel structure (week_day_slots) is added to the content_panels but is missing from the api_fields list. For consistency with the existing hours_of_operation field which is exposed in the API, consider adding an APIField for week_day_slots to the api_fields list if this data should be accessible via the API.
api_fields = [
APIField("introduction"),
APIField("image"),
APIField("body"),
APIField("address"),
APIField("lat_long"),
APIField("is_open"),
APIField("hours_of_operation"),
]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| print(" • Expand/collapse functionality per day") | ||
| print(" • Multiple time slots within each day") | ||
| print(" • Scroll behavior with nested panels") | ||
| print(" • Related to Wagtail issue #13352") |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test script references "Wagtail issue #13352", but the PR description mentions "fixes #555". These issue numbers should be consistent. Please verify which issue number is correct and update accordingly.
| LocationWeekDaySlot, | ||
| LocationHourSlot, | ||
| ) | ||
|
|
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'LocationWeekDaySlot' is not used.
Import of 'LocationHourSlot' is not used.
| LocationWeekDaySlot, | |
| LocationHourSlot, | |
| ) | |
| ) |
fixes #555
Create a two-level nested InlinePanel:

@thibaudcolas @simonw @cnk please review this PR and let me know if any changes are required