Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
This package is used for implementing soft delete functionality in models, when used you can delete and restore deleted items unless it was hard deleted from the database.
pip install dj-soft-delete
you can use it by extending HasSoftDelete
class in your model
from django_soft_delete.models import HasSoftDelete
class Item(HasSoftDelete):
...
Item.objects.all()
Item.with_trashed_objects.all()
Item.with_trashed_objects.deleted()
# via objects manager
Item.objects.filter(...).delete()
# via model instance
item = Item.objects.get(...)
item.delete()
# via objects manager
Item.objects.filter(...).hard_delete()
# via model instance
item = Item.objects.get(...)
item.hard_delete()
# via objects manager
Item.with_trashed_objects.filter(...).restore()
# via model instance
item = Item.with_trashed_objects.get(...)
item.restore()
FAQs
this application is for handling delete operations in the system
We found that dj-soft-delete demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.