2012-10-04 14 views

risposta

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

o per evitare di impostare un valore predefinito valido se gli stati cambiamenti:

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