{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/2"}],"enrichment":{"capability":"Provides soft-delete functionality for Django models, allowing objects to be masked from queries instead of permanently removed from the database.","skillfed_tags":["django-extension","soft-delete","audit-trail"],"use_cases":["Audit trails: retain deleted records for compliance or historical review without exposing them in normal application queries","Data recovery: restore accidentally deleted objects without database backups or manual intervention","Referential integrity: soft-delete dependent objects while preserving foreign-key relationships for reporting","Multi-tenant systems: hide deleted tenant data from queries while keeping it available for account recovery or legal holds","Admin interfaces: provide undo/restore functionality in Django admin for recently deleted records"],"what_it_does":"django-safedelete is a Django application that intercepts model deletion to implement soft-delete behavior\u2014marking objects as deleted in the database without physically removing them. Instead of calling DELETE on the database, it masks records so they remain retrievable for audit, recovery, or compliance purposes while being hidden from normal queries.\n\nYou define a deletion policy per model by setting the _safedelete_policy attribute. The package provides five policies: SOFT_DELETE (default, masks the object), SOFT_DELETE_CASCADE (masks the object and dependent models), HARD_DELETE (normal deletion), HARD_DELETE_NOCASCADE (hard-deletes only if no other objects reference it, otherwise soft-deletes), and NO_DELETE (prevents deletion entirely). Models inherit from SafeDeleteModel, and the package handles query filtering, admin integration, and restoration automatically.","worth_installing":"Yes, with conditions. The package is well-established (in top 5000 PyPI by downloads), has no known vulnerabilities, and low install friction. However, the aging maintenance status (527 days since last release) and lack of explicit Python 3.12+ / Django 5.1+ support in the fact sheet warrant verification before adopting in new projects targeting the latest Django versions. Suitable for existing Django applications needing soft-delete without major framework upgrades."},"id":"django-safedelete","links":{"html":"https://skillfed.io/packages/django-safedelete","md":"https://skillfed.io/packages/django-safedelete.md","pypi":"https://pypi.org/project/django-safedelete/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-03-05","license_spdx":null,"license_treatment":"permissive","name":"django-safedelete","python_support":"unspecified","summary":"Mask your objects instead of deleting them from your database."},"popularity":{"monthly_downloads":1206242,"position":4221,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.4.1"}
