django-batteries-0.0.1
توضیحات
Set of most common utils for django/drf projects
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-batteries-0.0.1 |
| نام | django-batteries |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Oleksandr Korol |
| ایمیل نویسنده | zibertua@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/django-batteries/ |
| مجوز | MIT |
# 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
نیازمندی
| مقدار | نام |
|---|---|
| >=4.1.7,<5.0.0 | django |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.11,<4.0 | Python |
نحوه نصب
نصب پکیج whl django-batteries-0.0.1:
pip install django-batteries-0.0.1.whl
نصب پکیج tar.gz django-batteries-0.0.1:
pip install django-batteries-0.0.1.tar.gz