EvilLogitech/python-project-52

View on GitHub
task_manager/labels/models.py

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
from django.db import models
from django.utils.translation import gettext as _


# Create your models here.
class Label(models.Model):
    name = models.CharField(
        max_length=255,
        unique=True,
        blank=False,
        verbose_name=_('Имя')
    )
    created_at = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = _('Метка')
        verbose_name_plural = _('Метки')