Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-phonenumber-field-0.2a1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file django-phonenumber-field-0.2a1.tar.gz.

File metadata

File hashes

Hashes for django-phonenumber-field-0.2a1.tar.gz
Algorithm Hash digest
SHA256 764ca9e4b3d0092c133f531ea07bfae3770e6e268b08a3f4f2044de7c97a0518
MD5 679bd11895bad571ec2d250ce3ad35ae
BLAKE2b-256 5d5c278eefa331edd682d4cacfb8b2e4c9d5aa5b01d05a2172d579ced58732e6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page