Exercise 3: What Happens When Deleting a Page With Children — Possible Solution ==================================================================== WHAT HAPPENS ------------------------------ Per this chapter, attempting to delete a page that still has children raises a clear, real error rather than silently cascading the deletion down through the whole subtree. Django's admin surfaces a PROTECT violation gracefully out of the box, showing exactly which related objects (the children) are blocking the deletion, rather than presenting a raw server error or crash. WHY THIS IS THE SAFER DEFAULT HERE ------------------------------ Per Chapter 2's own reasoning (revisited in this chapter), on_delete=PROTECT was chosen specifically because Django's actual default, CASCADE, would silently delete an entire subtree - potentially an entire subject's worth of content - the moment a single parent page was deleted, with no warning and no chance to reconsider. Requiring the deletion to fail loudly whenever children still exist forces a deliberate decision (delete or reparent the children first) rather than allowing a single click to destroy far more content than the admin actually intended to remove. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly describes the clear, non-silent error Django's admin shows for a PROTECT violation, and correctly explains why refusing the deletion outright is safer than CASCADE's own silent, unbounded subtree deletion for this specific tree-shaped content model.