19
如何設置默認STATUSES
選項?Django的選擇。如何設置默認選項?
class Order(models.Model):
STATUSES = (
(u'E', u'Expected'),
(u'S', u'Sent'),
(u'F', u'Finished'),
)
status = models.CharField(max_length=2, null=True, choices=STATUSES)