From 72b0f9f338599500d107d382ff2562897e5b8275 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Mon, 30 Dec 2024 22:58:14 +0100 Subject: [PATCH] Add sites Category model --- archivist/apps/sites/models.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 archivist/apps/sites/models.py diff --git a/archivist/apps/sites/models.py b/archivist/apps/sites/models.py new file mode 100644 index 0000000..fd10f10 --- /dev/null +++ b/archivist/apps/sites/models.py @@ -0,0 +1,20 @@ +from django.db import models +from django.urls import reverse + +from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation +from django.contrib.contenttypes.models import ContentType + +from django.utils.translation import gettext_lazy as _ + + +class Category(models.Model): + + name = models.CharField(unique=True, max_length=64) + + class Meta: + verbose_name = _("Category") + verbose_name_plural = _("Categories") + + def __str__(self): + return self.name.capitalize() +