Metadata-Version: 2.0
Name: django-phonenumber-field
Version: 0.2a3
Summary: An international phone number field for django models.
Home-page: http://github.com/stefanfoulis/django-phonenumber-field
Author: Stefan Foulis
Author-email: stefan.foulis@gmail.com
License: BSD
Platform: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Dist: phonenumbers

========================
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::

    from phonenumber_field.modelfields import PhoneNumberField
    class MyModel(models.Model):
        name = models.CharField(max_length=255)
        phone_number = PhoneNumberField()
        fax_number = PhoneNumberField(null=True, blank=True)

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.



