Abstract Django models for soft removal
Project description
django-soft-remover
Abstract Django models for soft removal
Installation
$ pip install django-soft-remover
Example of use
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.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-soft-remover-0.3.0.tar.gz
.
File metadata
- Download URL: django-soft-remover-0.3.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 963eb3bc8e07273572cd846d3754a32bcf513e1702129ee30f935e7a6aff46ab |
|
MD5 | 2e0689fb8766038daf49a46e7484abab |
|
BLAKE2b-256 | 0fd9cc7e1fd6b86bf80e9d43b9f428b337e001abea9773c03817451b9f00510b |
File details
Details for the file django_soft_remover-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: django_soft_remover-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9819b57fea28ca71a0a92fe63377ae8e2092083db2d9f37aac4fba4eda4c2728 |
|
MD5 | 831de272fb1c5fa228af030fb9fe3cf5 |
|
BLAKE2b-256 | 3f19ca215324bc0e1e3bc420c37407c2fb6e6df7e951a7ce3412d27afe8589cf |