【发布时间】:2023-03-05 08:18:01
【问题描述】:
当使用null=True 允许 Django 模型的数据库字段为 NULL 时,默认值是否保证默认为 NULL?还是我必须手动指定:
report = models.FileField(upload_to='reports', null=True, default=None)
^^^^^^^^^^^^
我在有关 models fields 的文档中找不到任何关于它的信息。
【问题讨论】:
标签: django django-models null django-1.7