class Item(models.Model):
ItemId = models.AutoField(primary_key=True)
ItemCode = models.CharField(max_length=50)
ItemName = models.CharField(max_length=50)
Remark = models.CharField(max_length=200)
def __str__(self):
return self.ItemName
python 3.0以下用
def
__unicode__(self): return self.ItemName