django-soft-remover


Namedjango-soft-remover JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/pikhovkin/django-soft-remover
SummaryAbstract Django models for soft removal
upload_time2023-03-14 17:31:38
maintainer
docs_urlNone
authorSergei Pikhovkin
requires_python>=3.8.*, <4.0.*
licenseMIT
keywords django restore soft-delete restore-data soft-deleting soft-remove
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-soft-remover

[![GitHub Actions](https://github.com/pikhovkin/django-soft-remover/workflows/build/badge.svg)](https://github.com/pikhovkin/django-soft-remover/actions)
[![PyPI](https://img.shields.io/pypi/v/django-soft-remover.svg)](https://pypi.org/project/django-soft-remover/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-soft-remover.svg)
[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)
![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-soft-remover.svg)
[![PyPI - License](https://img.shields.io/pypi/l/django-soft-remover)](./LICENSE)

Abstract Django models for soft removal

### Installation

```bash
$ pip install django-soft-remover
```

### Example of use

```python
from django.db import models

from soft_remover.models import SoftRemovableModel, SoftRestorableModel


class ManyUniqueTogetherRem(SoftRemovableModel):
    category = models.CharField(max_length=32)
    name = models.CharField(max_length=32)
    tag = models.CharField(max_length=32)
    value = models.PositiveSmallIntegerField()

    class Meta:
        unique_together = (('category', 'name', 'remver'), ('category', 'tag', 'remver'))


class ManyUniqueTogetherRes(SoftRestorableModel):
    category = models.CharField(max_length=32)
    name = models.CharField(max_length=32)
    tag = models.CharField(max_length=32)
    value = models.PositiveSmallIntegerField()

    class Meta:
        unique_together = (('category', 'name'), ('category', 'tag'))
```

See more examples in [test models](https://github.com/pikhovkin/django-soft-remover/blob/master/soft_remover/tests/models.py).

### License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pikhovkin/django-soft-remover",
    "name": "django-soft-remover",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.*, <4.0.*",
    "maintainer_email": "",
    "keywords": "django,restore,soft-delete,restore-data,soft-deleting,soft-remove",
    "author": "Sergei Pikhovkin",
    "author_email": "s@pikhovkin.ru",
    "download_url": "https://files.pythonhosted.org/packages/9f/66/e1e2b3d7b6bedce76127b7dfec3d7843514c763bac21b88be7e491b2812b/django-soft-remover-0.4.0.tar.gz",
    "platform": null,
    "description": "# django-soft-remover\n\n[![GitHub Actions](https://github.com/pikhovkin/django-soft-remover/workflows/build/badge.svg)](https://github.com/pikhovkin/django-soft-remover/actions)\n[![PyPI](https://img.shields.io/pypi/v/django-soft-remover.svg)](https://pypi.org/project/django-soft-remover/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-soft-remover.svg)\n[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)\n![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-soft-remover.svg)\n[![PyPI - License](https://img.shields.io/pypi/l/django-soft-remover)](./LICENSE)\n\nAbstract Django models for soft removal\n\n### Installation\n\n```bash\n$ pip install django-soft-remover\n```\n\n### Example of use\n\n```python\nfrom django.db import models\n\nfrom soft_remover.models import SoftRemovableModel, SoftRestorableModel\n\n\nclass ManyUniqueTogetherRem(SoftRemovableModel):\n    category = models.CharField(max_length=32)\n    name = models.CharField(max_length=32)\n    tag = models.CharField(max_length=32)\n    value = models.PositiveSmallIntegerField()\n\n    class Meta:\n        unique_together = (('category', 'name', 'remver'), ('category', 'tag', 'remver'))\n\n\nclass ManyUniqueTogetherRes(SoftRestorableModel):\n    category = models.CharField(max_length=32)\n    name = models.CharField(max_length=32)\n    tag = models.CharField(max_length=32)\n    value = models.PositiveSmallIntegerField()\n\n    class Meta:\n        unique_together = (('category', 'name'), ('category', 'tag'))\n```\n\nSee more examples in [test models](https://github.com/pikhovkin/django-soft-remover/blob/master/soft_remover/tests/models.py).\n\n### License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Abstract Django models for soft removal",
    "version": "0.4.0",
    "split_keywords": [
        "django",
        "restore",
        "soft-delete",
        "restore-data",
        "soft-deleting",
        "soft-remove"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "541c7f2255da5365dc63a55854f54bbf9afc4c3fd7ea635e63ea6dd034c89534",
                "md5": "db39a3882d0cbce10aba551163659a24",
                "sha256": "920e41ab643f632896200bfd8862c20f27cb849796bb85f5dff43611ba082f47"
            },
            "downloads": -1,
            "filename": "django_soft_remover-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db39a3882d0cbce10aba551163659a24",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.*, <4.0.*",
            "size": 7295,
            "upload_time": "2023-03-14T17:31:36",
            "upload_time_iso_8601": "2023-03-14T17:31:36.599696Z",
            "url": "https://files.pythonhosted.org/packages/54/1c/7f2255da5365dc63a55854f54bbf9afc4c3fd7ea635e63ea6dd034c89534/django_soft_remover-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f66e1e2b3d7b6bedce76127b7dfec3d7843514c763bac21b88be7e491b2812b",
                "md5": "e4faa50437e26c4d81707fab536dba37",
                "sha256": "1891ab85f3fad3e11d0fcb0bca90ba3d15a30f8db4b23d6a248881bf78f047ea"
            },
            "downloads": -1,
            "filename": "django-soft-remover-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e4faa50437e26c4d81707fab536dba37",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.*, <4.0.*",
            "size": 5217,
            "upload_time": "2023-03-14T17:31:38",
            "upload_time_iso_8601": "2023-03-14T17:31:38.648722Z",
            "url": "https://files.pythonhosted.org/packages/9f/66/e1e2b3d7b6bedce76127b7dfec3d7843514c763bac21b88be7e491b2812b/django-soft-remover-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-14 17:31:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "pikhovkin",
    "github_project": "django-soft-remover",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-soft-remover"
}
        
Elapsed time: 0.04877s