{"id":16838220,"url":"https://github.com/xrmx/django-denis","last_synced_at":"2025-04-11T05:15:57.441Z","repository":{"id":57419736,"uuid":"42878288","full_name":"xrmx/django-denis","owner":"xrmx","description":"Denis helps you recovering accidentally deleted data from a django project","archived":false,"fork":false,"pushed_at":"2019-05-27T15:19:35.000Z","size":34,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T05:15:50.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xrmx.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-21T16:19:46.000Z","updated_at":"2024-04-01T08:30:30.000Z","dependencies_parsed_at":"2022-09-13T15:11:26.206Z","dependency_job_id":null,"html_url":"https://github.com/xrmx/django-denis","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrmx%2Fdjango-denis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrmx%2Fdjango-denis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrmx%2Fdjango-denis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrmx%2Fdjango-denis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xrmx","download_url":"https://codeload.github.com/xrmx/django-denis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345273,"owners_count":21088245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T12:21:53.223Z","updated_at":"2025-04-11T05:15:57.423Z","avatar_url":"https://github.com/xrmx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-denis\n==============\n\n.. image:: https://travis-ci.org/xrmx/django-denis.svg\n    :target: https://travis-ci.org/xrmx/django-denis\n\nDenis helps you recovering accidentally deleted data from a django project.\n\nRationale\n---------\n\nHumans make mistakes, sometimes they delete data accidentally from the ``django admin``\nand you have to spend your afternoon recovering data from a db dump. Sometimes the human\nis called Denis.\n\nRequirements\n------------\n\n- Django \u003e= ``1.6``\n\nInstallation\n------------\n\n- ``pip install django-denis``\n\nUsage\n-----\n\nGiven a queryset ``django-denis`` finds what the django admin would delete and recover\nthem from a backup database.\n\nHere's an example session:\n\n::\n\n    $ python manage.py shell\n    \u003e\u003e\u003e from denis import Denis\n    \u003e\u003e\u003e from django.contrib.auth.models import User\n    \u003e\u003e\u003e User.objects.filter(pk=40182)\n    []\n    \u003e\u003e\u003e qs = User.objects.using('backup').filter(pk=40182)\n    \u003e\u003e\u003e denis = Denis(qs, using='backup')\n    \u003e\u003e\u003e denis.recover(using='default')\n    \u003e\u003e\u003e User.objects.using('default').filter(pk=40182)\n    \u003cUser: cicciopasticcio\u003e\n\nThe code above assumes a configuration entry called ``backup`` for ``DATABASES`` in ``settings.py``\nthat should point to a database containing the data you want to recover.\n\nBe cautious\n-----------\n\nPlease always test (and test again) recovery on a copy of your database so you can double check\nthat everything works fine before doing it on your production db.\n\nOf course we don't take any responsibility with this code. Use at your own risk!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrmx%2Fdjango-denis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxrmx%2Fdjango-denis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrmx%2Fdjango-denis/lists"}