An international phone number field for django models.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-phonenumber-field-0.2a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 764ca9e4b3d0092c133f531ea07bfae3770e6e268b08a3f4f2044de7c97a0518 |
|
MD5 | 679bd11895bad571ec2d250ce3ad35ae |
|
BLAKE2b-256 | 5d5c278eefa331edd682d4cacfb8b2e4c9d5aa5b01d05a2172d579ced58732e6 |