gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s

This commit is contained in:
2026-04-15 08:59:36 +02:00
commit ab73d05ecc
359 changed files with 14415 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
from django.db import models
from polymorphic import models as polymorphic
from django.utils.translation import gettext as _
class Tags(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Meta:
verbose_name = _("Tag")
verbose_name_plural = _("Tags")
class Comment(models.Model):
text = models.CharField(max_length=255)
def __str__(self) -> str:
return self.text
class BaseComment(polymorphic.PolymorphicModel):
comments = models.ManyToManyField(Comment)
class Post(BaseComment):
title = models.CharField(max_length=255)
desc = models.TextField()
image = models.ImageField(upload_to="posts/", blank=True)
tags = models.ManyToManyField(Tags)
def __str__(self):
return self.title
class FrontendTranslation(BaseComment):
key = models.CharField(max_length=255, unique=True)
value = models.TextField()
def __str__(self):
return self.key
class Meta:
verbose_name = _("Frontend Translation")
verbose_name_plural = _("Frontend Translations")