Metadata-Version: 2.1
Name: django-lc-utils
Version: 0.2.1
Summary: Utilities for Django application
Home-page: https://github.com/Lenders-Cooperative/django-lc-utils
License: BSD-3-Clause
Author: Tejas Bhandari
Author-email: tejas@thesummitgrp.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Django (>=3.1.13,<4.0.0)
Requires-Dist: django-model-utils (>=4.2.0,<5.0.0)
Description-Content-Type: text/markdown

# 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.

```python
INSTALLED_APPS = [
    'django_lc_utils'
]
```

## Utilities

1. Django Soft Delete Mixin

This is a custom mixin to enable soft delete feature on the Django models.

```python
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")
```
