有一個古老的代碼如下所示兩種型號: class Watermelon(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=64, default='Unnamed Watermelon')
is_allegic = models.Boolea
請看看: class Categorie(models.Model):
id = models.AutoField('id', primary_key=True)
title = models.CharField('title', max_length=800)
articles = models.ManyToManyField(Article)
class Ar
我有一個Article表 class Article(models.Model):
"""
Model to keep articles
"""
ext_id = models.UUIDField(primary_key=True, db_index=True, default=uuid.uuid4, editable=False)
title
模型定義: class Footprint(models.Model)
date = models.DateTimeField(auto_now = True)
class Stuff(Footprint):
name = models.CharField(max_length = 255)
some_other_field = models.CharField(