Skip to main content

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

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


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)

Uploaded Source

Built Distribution

django_lc_utils-0.2.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page