18 lines
621 B
Python
Executable File
18 lines
621 B
Python
Executable File
from django.db import models
|
|
from rules.contrib.models import RulesModel
|
|
|
|
from outbo.apps.core.models import TimestampableDeletableMixin
|
|
from django.utils.translation import gettext_lazy as _, pgettext
|
|
|
|
|
|
class Category(TimestampableDeletableMixin, RulesModel):
|
|
class Meta:
|
|
verbose_name = _("category")
|
|
verbose_name_plural = _("categories")
|
|
|
|
label = models.CharField(verbose_name=_("label"), max_length=30, primary_key=True)
|
|
description = models.CharField(verbose_name=_("description"), max_length=30)
|
|
|
|
def __str__(self):
|
|
return pgettext("photo_brief_categories", self.description)
|