根据model生成数据库表: python manage.py syncdb 根据数据库表生成model: python manage.py inspectdb>models.py#注: 该命令在PyDev上运行失败,只能在命令行执行。 latest_models.py 是随便取的名字