Добавлен класс DescriptionMixin
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
from .created_at_mixin import CreatedAtMixin
|
||||
from .deleted_at_mixin import DeletedAtMixin
|
||||
from .description_mixin import DescriptionMixin
|
||||
from .expired_at_mixin import ExpiresAtMixin
|
||||
from .slug_mixin import SlugMixin
|
||||
from .updated_at_mixin import UpdatedAtMixin
|
||||
|
||||
34
net/xeaf/rack/models/mixins/description_mixin.py
Normal file
34
net/xeaf/rack/models/mixins/description_mixin.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# DRF Rack
|
||||
# Библиотека классов расширений для Django REST Framework
|
||||
#
|
||||
# Автор: Николай В. Анохин <n.anokhin@xeaf.net>
|
||||
# Все права защищены. Лицензия: MIT
|
||||
|
||||
"""
|
||||
Описание класса DescriptionMixin
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class DescriptionMixin(models.Model):
|
||||
"""
|
||||
Добавляет к модели свойство Описание
|
||||
"""
|
||||
|
||||
description = models.TextField(
|
||||
max_length=2048,
|
||||
editable=True,
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_("rack.mixin.description"),
|
||||
)
|
||||
""" Описание """
|
||||
|
||||
class Meta:
|
||||
"""
|
||||
Конфигурация класс
|
||||
"""
|
||||
|
||||
abstract = True
|
||||
Reference in New Issue
Block a user