【发布时间】:2014-09-23 23:13:18
【问题描述】:
我的 Django 模型:
from localflavor.us.forms import USPhoneNumberField
class Profile(models.Model):
cellPhone = USPhoneNumberField(null=True, blank=True,)
当我执行 manage.py syncdb 时,这给了我以下错误:
cellPhone = USPhoneNumberField(null=True, blank=True,)
TypeError: __init__() got an unexpected keyword argument 'null'
如果它不允许我将它声明为 null=True 就像我对许多其他字段所做的那样,我该如何使此字段成为可选?
【问题讨论】:
-
噪音警报 - 这是source code的链接
标签: python django django-localflavor