Skip to main content

===== Django Recyclebin

Django Recyclebin is a Django app to create recyclebin functionality in your project. you will be able to temporarily delete, restore and permanently delete data.

Quick start

  1. Add "recyclebin" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'recyclebin', ]

  2. import SoftDeleteMixin ''from recyclebin.models import SoftDeleteMixin''

  3. Inherit your model with SoftDeleteMixin

     ``class Mymodel(SoftDeleteMixin)``
    
  4. Run python manage.py makemigrations and python manage.py migrate.

  5. import recyclebin functions from recyclebin.functions import get_deleted_items, restore, permanent_delete

  6. How to temporarily delete. you don't need to do anything. after inheriting your model with SoftDeleteMixin. your regular .delete() method will temporarily delete objects

  7. How to view deleted items create a list of models from myapp.models import Model1, Model2, Model3... li = [Model1, Model2, Model3...] get_deleted_items(li)

    ''This function will return serialized response that will contain model_name, name, pk, deleted_by, deleted_at''

    YOUR MODEL MUST HAVE NAME FIELD OTHERWISE NONE WILL BE RETURNED INSTEAD OF NAME

  8. How to restore pass restore function model name and id. model name must be string and id an integer restore(model1, 1)

  9. How to permanently delete pass permanent_delete function model name and id. model name must be string and id an integer permanent_delete(model1, 1)

Metadata

Release files for django-recyclebin 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-recyclebin 0.2
File Interpreter ABI Platform Actions
django_recyclebin-0.2-py3-none-any.whl Python 3 none any Details for django_recyclebin-0.2-py3-none-any.whl

Release files / django_recyclebin-0.2-py3-none-any.whl

Download URL django_recyclebin-0.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8af4f1b6f4ffa29e61316e92d1948d92056a46b4f650adc922d06e8af7cf40d
BLAKE2b-256 checksum
How to use checksums
352937690e4945556ec4c317f0a957d6904716528a7cf8b3478e631a0f4465b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Security for django-recyclebin 0.2

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.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page