1. 首页
  2. 数据库
  3. 其它
  4. Django数据模型中on_delete使用详解

Django数据模型中on_delete使用详解

上传者: 2021-01-30 03:30:42上传 PDF文件 53.9KB 热度 17次
on_delete属性针对外键ForeignKey 一、django3.0官方文档介绍: Many-to-one relationships多对一关系 To define a many-to-one relationship, use django.db.models.ForeignKey. You use it just like any other Field type: by including it as a class attribute of your model. ForeignKey requires a positional argument: the class to
用户评论