Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darknessrdg/django-paranoid-model
Django abstract model with paranoid behavior
https://github.com/darknessrdg/django-paranoid-model
delete django django-models orm paranoid python timestamp
Last synced: 2 months ago
JSON representation
Django abstract model with paranoid behavior
- Host: GitHub
- URL: https://github.com/darknessrdg/django-paranoid-model
- Owner: DarknessRdg
- License: mit
- Created: 2019-12-09T21:35:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T08:34:18.000Z (over 3 years ago)
- Last Synced: 2024-11-27T17:37:14.492Z (2 months ago)
- Topics: delete, django, django-models, orm, paranoid, python, timestamp
- Language: Python
- Homepage: https://darknessrdg.github.io/django-paranoid-model/
- Size: 1.16 MB
- Stars: 19
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
**Read the docs: **
# django-paranoid-model
Django abstract model with paranoid behavior, therefore when an instance is deleted it is not really deleted from database, it's applied a mask on the filter so when filter, the result are the "undeleted" instances.
Sometimes you might want to keep all datas saved on your database and when user wants do delete, it is just hidden form user.
All documentation are in the `mkdocs/docs` directory and online at [HERE !!](https://darknessrdg.github.io/django-paranoid-model/). If you're new here, we recomend you to checkout the documentation first :wink: .
## Quick start
Install Django Paranoid Model package from pip
```py
pip install django-paranoid-model
```Add paranoid_model to your installed apps so you can use django admin with a paranoid behavior
```py
INSTALLED_APPS = [
...
'paranoid_model'
]
```Good job ! You're now ready to use it.
Run tests
---------
```
pip install -e .[test]
pytest
```
or run Tox to test on multiple Django versions
```
pip install tox
tox
```