Add: TagModel to archive app

This commit is contained in:
Aroy-Art 2025-03-13 18:33:08 +01:00
parent 9c4ef5466e
commit 25936125e1
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -102,6 +102,24 @@ class CreatorModel(models.Model):
return str(self.name)
class TagModel(models.Model):
slug = models.CharField(max_length=64)
name = models.CharField(max_length=64)
date_modified = models.DateTimeField(auto_now=True)
date_created = models.DateTimeField(auto_now_add=True)
mature = models.BooleanField(default=False)
class Meta:
verbose_name = "Tag"
verbose_name_plural = "Tags"
def __str__(self):
if len(str(self.name)) > 0:
return str(self.name)
else:
return str(self.slug)
class PostModel(models.Model):
post_id = models.CharField(max_length=128, db_index=True)
title = models.CharField(max_length=64)