|
|
@@ -69,6 +69,21 @@ class UppercaseCharField(CharField):
|
|
69
|
69
|
return val
|
|
70
|
70
|
|
|
71
|
71
|
class PhoneNumberField(Field):
|
|
|
72
|
+ """
|
|
|
73
|
+ Copyright (c) 2011 Stefan Foulis and contributors.
|
|
|
74
|
+ https://github.com/stefanfoulis/django-phonenumber-field
|
|
|
75
|
+
|
|
|
76
|
+ Taken from fork https://github.com/maikhoepfel/django-phonenumber-field/
|
|
|
77
|
+
|
|
|
78
|
+ A international phone number field for django that uses
|
|
|
79
|
+ http://pypi.python.org/pypi/phonenumbers for validation.
|
|
|
80
|
+
|
|
|
81
|
+ * Validates a wide range of phone number formats
|
|
|
82
|
+ * Displays it nicely formatted
|
|
|
83
|
+ * Can be given a hint for the country, so that it can accept local numbers,
|
|
|
84
|
+ that are not in an international format
|
|
|
85
|
+ """
|
|
|
86
|
+
|
|
72
|
87
|
attr_class = phonenumber.PhoneNumber
|
|
73
|
88
|
descriptor_class = phonenumber.PhoneNumberDescriptor
|
|
74
|
89
|
default_validators = [phonenumber.validate_international_phonenumber]
|