我正在构建一个网络应用程序,其中每个产品都有自己的“配置文件”。我需要向模型添加某种字段,我可以在其中添加带有日期和文本的“评论”,以跟踪信息,例如公式更改、提供商更改、价格更改等。
有任何想法吗?
models.py
from django.db import models
# Create your models here.
class Horse(models.Model):
name = models.CharField(max_length=255)
nacimiento = models.DateField(blank=True, null=True)
nro = models.IntegerField()
event = models.TextField()
slug = models.SlugField(unique=True)
def __str__(self):
return '%s-%s' % (self.name, self.nro)
因此,对于发生的每个事件,我都需要一个带有文本字段中提供的描述的新入口。
慕雪6442864
红糖糍粑
相关分类