Django Custom Managers Are Silently Leaking Data

Django custom managers are a common way to exclude rows by default, such as inactive or soft-deleted rows. However, they don&rsquo;t run everywhere you&rsquo;d expect, which leads to unintended data exposure. This post covers where that happens and how to fix it. The Setup Let&rsquo;s model stores and products with a soft-deletable relationship: class Store (models . Model): name = models .…