I have a model as follows:
我有一个模型如下:
class Item(models.Model):
VENDOR_CHOICES = (
('a', 'A'),
('b', 'B')
)
vendor = models.CharField(max_length=16, choices=VENDOR_CHOICES)
name = models.CharField(max_length=255)
price = models.DecimalField(max_digits=6, decimal_places=2)
class