9
我想跟隨在我修改以下如何讓我的模型字段在Django中可選?
date_of_birth = models.DateField(null=True)
的
https://docs.djangoproject.com/en/dev/topics/auth/customizing/
在我的模型底部的完整的例子。然而,當我嘗試註冊一個用戶我仍然得到以下錯誤消息:
date_of_birth <ul class="errorlist"><li>This field is required.</li></ul>
在什麼其他地方我需要使date_of_birth可選?
如果blank = True,會發生什麼情況,但您將null保留爲false? (假設false是默認值) –