Metadata-Version: 2.0
Name: django-phonenumbers
Version: 1.0.1
Summary: Phone number field for Django admin
Home-page: https://github.com/iraklikhitarishvili/django_phonenumbers
Author: irakli khitarishvili
Author-email: iraklikhitarishvili@yahoo.com
License: BSD License
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Dist: phonenumbers

Installation
============

::

    run  pip install django_phonenumbers

Configure settings.py
======================

::

     Add django_phonenumbers to INSTALLED_APPS

manage.py
=========

::

     run manage.py collectstatic

settings.py
===========


.. code:: python

        PHONE_NUMBER_REGION = 'GE'  
        PHONE_NUMBERS_FORMATS_BY_REGION = {
            'GE': {
                'pattern': '(\\d{3})(\\d{2})(\\d{2})(\\d{2})', 'format': '\\1 \\2-\\3-\\4', 'prefix_format': '+%s (%s)'
            },
            'US': {
                'pattern': '(\\d{3})(\\d{3})(\\d{4})', 'format': '\\1 \\2-\\3', 'prefix_format': '+%s (%s)'
            },
        }


Template example
================

.. code:: html

    {% load croppingtools_extra %}
    <li>
                {{ number.phone_number }}
                // {{ number.phone_number.region_code }}
                // {{ number.phone_number.country_code }}
                // {{ number.phone_number.phone_number }}
                <div>
                    {% load phone_numbers_extra %}
                    <h4>Filter
                        <small>{{ number.phone_number|phone_number_format }}</small>
                    </h4>
                    <h4>Simple tag
                        <small>
                            {% phone_number number.phone_number pattern='(\\d{3})(\\d{3})(\\d{3})' number_format='\\1 \\2-\\3' prefix_format='+%s (%s)' %}
                        </small>
                    </h4>
                </div>
    </li>



