Set of most common utils for django/drf projects
Project description
Django-batteries
This package contains useful utilities for django/drf project
Models
Contains set of abstract models to enforce DRY principle for most common use cases
TimeStampedModel
created
modified
TimeFramedModel
-
start
-
end
For time bound entities
DescriptionModel
description
TitleModel
title
TitleDescriptionModel
title
description
Fields
Monitor field
A DateTimeField that monitors another field on the same model and sets itself to the current date/time whenever the monitored field changes. use it like this in your models: class MyMode(models.Model):
title = models.Charfield(max_length=50)
title_changed = MonitorField(_('title changed'), monitor='title')
Tests
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_batteries-0.0.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for django_batteries-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60d98e69639f69533625a9840aae0d683624b6b7b30f1802e779e680c13ceacf |
|
MD5 | b73527f72699d312927dfe450cac8b67 |
|
BLAKE2b-256 | eb2c5c175ca7fea2f859e48a184da67cfb13b92a770daa912c84d5297116bf8e |