Phonenumber Field

11 views
Skip to first unread message

Soumen Khatua

unread,
May 2, 2019, 6:07:36 AM5/2/19
to django...@googlegroups.com
Hi Folks,
Actullay I didn't understand the  how this code is working,Please if you guys know about the convention,can you please give me some eaxmple with explanation. 

models.py

from phonenumber_field.modelfields import PhoneNumber, PhoneNumberField

class PossiblePhoneNumberField(PhoneNumberField):
    """Less strict field for phone numbers written to database."""

    default_validators = [validate_possible_number]


class Address(models.Model):
phone = PossiblePhoneNumberField(blank=True, default='')

    class Meta:
        ordering = ('pk', )


Thank you.

Regards,
Soumen
Reply all
Reply to author
Forward
0 new messages