Soft Delete
Installation
pip install django-generic-delete
Configuration
INSTALLED_APPS = [
....
'softdelete',
]
in urls
urlpatterns = [
....
path('delete/', include('softdelete.urls', namespace='softdelete'))
]
Usage
In models
- Extend
# import this
from softdelete.models import SoftDeletionModel
class YourModel(SoftDeletionModel):
# your fields
pass
Override templates
- in your
templates
add the following directory
templates/
softdelete/
delete.configuration.html