django-denis
Denis helps you recovering accidentally deleted data from a django project.
Rationale
Humans make mistakes, sometimes they delete data accidentally from the django admin and you have to spend your afternoon recovering data from a db dump. Sometimes the human is called Denis.
Requirements
Django >= 1.6
Installation
pip install django-denis
Usage
Given a queryset django-denis finds what the django admin would delete and recover them from a backup database.
Here’s an example session:
$ python manage.py shell
>>> from denis import Denis
>>> from django.contrib.auth.models import User
>>> User.objects.filter(pk=40182)
[]
>>> qs = User.objects.using('backup').filter(pk=40182)
>>> denis = Denis(qs, using='backup')
>>> denis.recover(using='default')
>>> User.objects.using('default').filter(pk=40182)
<User: cicciopasticcio>
The code above assumes a configuration entry called backup for DATABASES in settings.py that should point to a database containing the data you want to recover.
Be cautious
Please always test (and test again) recovery on a copy of your database so you can double check that everything works fine before doing it on your production db.
Of course we don’t take any responsibility with this code. Use at your own risk!
Metadata
Release files for django-denis 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-denis-0.3.0.tar.gz | 3.0 kB | Without provenance | Details |
Release files / django-denis-0.3.0.tar.gz
| Download URL | django-denis-0.3.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a8e1212782ce8f21edc06972c09289f4863ecb2d3e34e3377d2d7eaac9cd762
|
|
BLAKE2b-256 checksum How to use checksums |
bdf0c4d0a1c3e9267424fec220a41607f43352e0fc221ea070719dd3e379f2b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for django-denis 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.