Skip to main content

A simple Django filter that will format and print a phone number in a template.

Project description

Django Phone Number Filter
==========================

.. image:: https://circleci.com/gh/foundertherapy/django-phonenumber-filter.png
:target: https://circleci.com/gh/foundertherapy/django-phonenumber-filter

About
-----

``django-phonenumber-filter`` is a Django app that will format and print a
phonenumber in a template.

Getting Started
---------------

$ pip install django-phonenumber-filter

Add "phonenumber_filter" to your INSTALLED_APPS setting like this:

INSTALLED_APPS = (
...
'phonenumber_filter',
)

Then, in your template, load the ``phonenumber_filter`` template tag library:

{% load phonenumber_filters %}

To format and print a phone number, use the ``phonenumber`` filter:

{{ raw_phone_number|phonenumber }}

If you want to format the phone number for a particular country, include the
optional country code:

{{ raw_phone_number|phonenumber:"IL" }}

International and E164 formats are also supported:

{{ raw_phone_number|phonenumber_international:"IL" }}
{{ raw_phone_number|phonenumber_e164:"IL" }}

Project details


Download files

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

Files for django-phonenumber-filter, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django-phonenumber-filter-1.0.0.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page