Django-ORM

模型

模型是你的数据的唯一的、权威的信息源。它包含你所储存数据的必要字段和行为。通常,每个模型对应数据库中唯一的一张表。

1
A model class represents a database table, and an instance of that class represents a particular record in the database table.

一旦你建立好数据模型之后,django会自动生成一套数据库抽象的API,可以让你执行增删改查的操作。

 

posted @ 2018-01-14 12:24  skyflask  阅读(76)  评论(0编辑  收藏  举报