django-deletes
pypi i django-deletes

django-deletes

A fully functional soft deletes (logical deletes) for django.

by upgrad

0.1 (see all)License:MIT License
pypi i django-deletes
Readme

Soft Deletes for Django.

Installation Instructions


#. pip install django-deletes # Doesnt work yet, clone the repo.
#. Add ‘softdeletes’ to INSTALLED\_APPS in settings

Usage
~~~~~

#. Use Deletable class on the left most in the inhertance chain of the
   model.
#. Use objects = DeletableManager.from\_queryset(DeletableQuerySet)()
#. If you want to use a custom manager or a custom Queryset, make sure
   your custom manager inherits from DeletableManagerMixin and your
   custom QuerySet inherits from Deletable QuerySetMixin

Caution
~~~~~~~

All cascading delete models should be made deletable, otherwise
cascading delete would do a real delete to the foreignkey related
models.

GitHub Stars

12

LAST COMMIT

6yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

8

OPEN PRs

0
VersionTagPublished
0.1
6yrs ago
No alternatives found
No tutorials found
Add a tutorial