My Django Model:
from localflavor.us.forms import USPhoneNumberField
class Profile(models.Model):
cellPhone = USPhoneNumberField(null=True, blank=True,)
This gives me the following error when I do a manage.py syncdb:
cellPhone = USPhoneNumberField(null=True, blank=True,)
TypeError: __init__() got an unexpected keyword argument 'null'
How can I make this field optional if it won't let me declare it as null=True like I do for so many other fields?
USPhoneNumberField
is aform
type, not a model typeThe usage (typically) is:
and forms.py
Here is the documentation