Commit 4293ca1
Refactor: eliminate core↔health circular dependency, split monoliths
Phase 1 — AircraftViewSet action registry + health mixin:
- core/action_registry.py: permission routing registry; plugins register
via register_owner/pilot/read_pilot_write_owner_actions()
- health/aircraft_actions.py: HealthAircraftActionsMixin with all 20
@action methods moved out of AircraftViewSet; registers permissions
at module load time so AircraftViewSet.get_permissions() stays generic
- health/serializer_mixins.py: AirworthinessMixin moved from core
- core/serializers.py: import AirworthinessMixin from health
- core/sharing.py: validate_share_token() helper extracted
- health/views_public.py: PublicAircraftSummaryAPI + PublicLogbookEntriesAPI
moved from core; core now has zero module-level health imports except
the two intentional bridge imports
Phase 2 — Split core/views.py (2168 lines) → core/views/ package:
- aircraft.py, auth_views.py, public_views.py, import_export_views.py,
template_views.py, logbook_import_view.py, notes_events.py,
user_views.py, invitations.py
- __init__.py re-exports all public names for backwards compatibility
Phase 3 — Split aircraft_detail.html (6123 lines) → parent + 10 includes:
- core/templates/includes/detail_{overview,components,logbook,squawks,
compliance,records,consumables,documents,roles,flights}.html
- Parent template reduced to ~262 lines (header + tab nav + {% include %})
Phase 4 — Per-app URL registration lists + shared router:
- core/urls.py: ROUTER_REGISTRATIONS (5 core routes)
- health/urls.py: ROUTER_REGISTRATIONS (15 health routes)
- simple_aircraft_manager/urls.py: single loop replaces 20 inline calls
All 719 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bda9700 commit 4293ca1
33 files changed
Lines changed: 8385 additions & 8073 deletions
File tree
- core
- templates
- includes
- views
- docs
- health
- simple_aircraft_manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments