0
class Animal(models.Model):
title = models.CharField(max_length=255)
color = models.ForeignKey(Color)
class Color(models.Model):
name = models.CharField(null=False, max_length=250)
other = models.CharField(null=False, max_length=250)
如何在admin中創建StackedInline
爲Animal
?在編輯Animal
對象期間,我需要看到Color
屬性。如何在我的情況下創建StackedInline?