null 是针对数据库而言,如果 null=True, 表示数据库的该字段可以为空,那么在新建一个model对象的时候是不会报错的!!

blank 是针对表单的,如果 blank=True,表示你的表单填写该字段的时候可以不填,比如 admin 界面下增加 model 一条记录的时候。直观的看到就是该字段不是粗体。

 https://blog.csdn.net/d_hyacinth/article/details/53364051

http://www.360doc.com/content/15/0526/22/10072361_473483633.shtml

相关文章:

  • 2021-07-12
  • 2021-08-07
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2021-11-26
  • 2021-09-08
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案