Production-Ready Soft Delete System with Django Custom User Model

Hi all :waving_hand:

We recently faced a classic Django dilemma while building a financial portfolio management app:
How do you “delete” users without losing compliance, transaction integrity, or sanity?

Like many, we started with Django’s default User + UserProfile… and ran straight into a wall:

  • JOIN hell in every query

  • Redundant checks across the codebase

  • And no clean way to soft-delete users or preserve audit trails

So we went back and implemented a custom User model from Day 1 with built-in soft delete. It now supports:

  • GDPR-safe user deletion

  • Full admin support for bulk soft delete + restore

  • Preserved relationships (e.g. transactions use on_delete=PROTECT)

  • Compliance-friendly fields like deleted_by and deleted_at

We open-sourced the full write-up (with code, admin actions, and query strategies) here:
:backhand_index_pointing_right: How We Built a Soft Delete System for Django Without Losing Our Sanity

Would love your thoughts — especially if you’ve solved this differently or used libraries like django-safedelete.