2012-10-04 141 views

回答

33
status = models.CharField(max_length=2, null=True, choices=STATUSES, default='E') 

或避免,如果狀態變化設置一個無效的默認:

status = models.CharField(max_length=2, null=True, choices=STATUSES, default=STATUSES[0][0])