摘要:
1, 在Modle中增加新的属性;class Animal(models.Model): name = models.CharField(max_length=20) sound = models.CharField(max_length=20) weight = models.IntegerField() # 新加字段2, 执行python manage.py sql animal (APP名),查看创建表的SQL语句:E:\mysite>python manage.py sql animalsBEGIN;CREATE TABLE `animals_animal` (`i... 阅读全文