Archive / safe delete Django models
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
django_archive_mixin
tests
.coveragerc
.gitignore
CHANGES.md
LICENSE
README.md
circle.yml
requirements.txt
runtests.sh
setup.py

README.md

Circle CI Coverage Status

Django Archive Mixin

Implements a soft delete / archive capability for the Django ORM.

This project is inspired by other similar projects, such as

This implementation differs in that it not only safely marks an instance as deleted, but it also implements that cascade logic so that relationships that point to the recently "deleted" instance do not break your application.

We piggyback on Django's own delete logic/methodology to help guarentee that it will cascade as expected and will abide by Django's on_delete api for ForeignKeys.

Testing

We test this against a postgres database, once you have postgres installed in running, testing is as simple as

./runtests.sh