Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f26c4f4
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
======================== | ||
django-phonenumber-field | ||
======================== | ||
|
||
|
||
A international phone number field for django that uses http://pypi.python.org/pypi/phonenumbers for validation . | ||
|
||
Installation | ||
============ | ||
|
||
:: | ||
|
||
pip install django-phonenumber-field | ||
|
||
|
||
Basic usage | ||
=========== | ||
|
||
Use it like any regular model field:: | ||
|
||
class MyModel(models.Model): | ||
name = models.CharField(max_length=255) | ||
phone_number = PhoneNumberField() | ||
|
||
PhoneNumberField will always represent the number as a string of an international phonenumber in the database. E.g | ||
`+41524204242`. | ||
|
||
The object returned is not just a plain String. It is a PhoneNumber object. Currently it is necessary to always use | ||
the international format when entering data. | ||
|
||
Future versions of django-phonenumber-field may provide custom special widgets that support more custom formatting. | ||
|