Utilities for Django application
Project description
Django LC Utils
Django app for various django utilities
pip install django-lc-utils
Prerequisites
This package relies on django-model-utils
, Django
.
Running Tests
python manage.py test
Usuage
In order to use the system you must add django_lc_utils to your installed apps in your settings.py file.
INSTALLED_APPS = [
'django_lc_utils'
]
Utilities
- Django Soft Delete Mixin
This is a custom mixin to enable soft delete feature on the Django models.
from django_lc_utils.mixins import SoftDeleteMixin
from model_utils.models import TimeStampedModel
class TestModel(TimeStampedModel, SoftDeleteMixin):
class Meta:
db_table = "test_model"
verbose_name = "Django Test Model"
verbose_name_plural = "Djando Test Models"
test_field = models.TextField("Test field")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-lc-utils-0.2.1.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for django_lc_utils-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b10983b847a2c07b395ebbe726c0b28134f02c59083cccffb7138239e375ae2 |
|
MD5 | 71ccb0dad4bb99e6f41f871814654952 |
|
BLAKE2b-256 | 6474e99ba465a3f4029190d2dda96d43d7a10c21e4deb99ca2ae8520e4d2ec0b |