是否可以或相对于另一个选择字段来设置选择字段,如以下示例所示:
CHOICES = (
(1,'a'),
(2,'b)
)
choice1 = (()())
choice2 = (()())
class ABC(models.Model):
choice = models.IntegerField(choices = CHOICES)
nested_choice = models.IntegerField(choices = [if 1 then choice1 elif 2 then choice2])