phone number field

34

pip install django-phonenumber-field[phonenumberslite]
from phonenumber_field.modelfields import PhoneNumberField

class MyModel(models.Model):
    name = models.CharField(max_length=255)
    phone_number = PhoneNumberField()
    fax_number = PhoneNumberField(blank=True)
INSTALLED_APPS = [
    ...
    'phonenumber_field',
    ...
]
pip install django-phonenumber-field[phonenumbers]

Comments

Submit
0 Comments