django-phonenumber-field 0.2a1
An international phone number field for django models.
Latest Version: 0.2a3
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.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-phonenumber-field-0.2a1.tar.gz (md5) | Source | 2011-09-01 | 4KB | 501 | |
- Author: Stefan Foulis
- Home Page: http://github.com/stefanfoulis/django-phonenumber-field
- License: BSD
- Platform: OS Independent
- Categories
- Package Index Owner: stefanfoulis
- DOAP record: django-phonenumber-field-0.2a1.xml
