A django model and form field for normalised phone numbers using python-phonenumbers

Overview

django-phonenumber-field

https://travis-ci.org/stefanfoulis/django-phonenumber-field.svg?branch=master

A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonenumbers is a port of Google's libphonenumber library, which powers Android's phone number handling.

Included are:

  • PhoneNumber, a pythonic wrapper around python-phonenumbers' PhoneNumber class
  • PhoneNumberField, a model field
  • PhoneNumberField, a form field
  • PhoneNumberField, a serializer field
  • PhoneNumberPrefixWidget, a form widget for selecting a region code and entering a national number. Requires the Babel package be installed.
  • PhoneNumberInternationalFallbackWidget, a form widget that uses national numbers unless an international number is entered. A PHONENUMBER_DEFAULT_REGION setting needs to be added to your Django settings in order to know which national number format to recognize. The setting is a string containing an ISO-3166-1 two-letter country code.

Installation

pip install django-phonenumber-field[phonenumbers]

As an alternative to the phonenumbers package, it is possible to install the phonenumberslite package which has a lower memory footprint.

pip install django-phonenumber-field[phonenumberslite]

Basic usage

First, add phonenumber_field to the list of the installed apps in your settings.py file:

INSTALLED_APPS = [
    ...
    'phonenumber_field',
    ...
]

Then, you can 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(blank=True)

Internally, PhoneNumberField is based upon CharField and by default represents the number as a string of an international phonenumber in the database (e.g '+41524204242').

Representation can be set by PHONENUMBER_DB_FORMAT variable in django settings module. This variable must be one of 'E164', 'INTERNATIONAL', 'NATIONAL' or 'RFC3966'. Recommended is one of the globally meaningful formats 'E164', 'INTERNATIONAL' or 'RFC3966'. 'NATIONAL' format require to set up PHONENUMBER_DEFAULT_REGION variable.

The object returned is a PhoneNumber instance, not a string. If strings are used to initialize it, e.g. via MyModel(phone_number='+41524204242') or form handling, it has to be a phone number with country code.

Running tests

tox needs to be installed. To run the whole test matrix with the locally available Python interpreters and generate a combined coverage report:

tox

run a specific combination:

tox -e py36-djmaster,py39-djmaster
Comments
  • Create a new 0.7 version?

    Create a new 0.7 version?

    The 0.6 version has some bugs (like'NoneType' object has no attribute 'as_e164') which are resolved in merges there after, but difficult to get the latest version from pip.

    opened by devangmundhra 15
  • Save should not raise `ValueError` on invalid phonenumber

    Save should not raise `ValueError` on invalid phonenumber

    Save() should only raise ValueErrors when the data to be stored is incompatible with the raw field data. A string that contains data that is not a valid phone number doesn't count as invalid, and should be checked in clean(), not in save().

    closes #334

    opened by karolyi 14
  • Widget initial by label, not value (country code US does not initialize as United States)

    Widget initial by label, not value (country code US does not initialize as United States)

    I am trying to set the initial value of the Prefix select, the issue is that when using initial='US' the select defaults to "American Samoa" because it is the first item in the list with the value of "+1", rather than "United States".

    Is there a way to set the initial value based on the label rather than the value because of the duplicate country codes?

    opened by nwaxiomatic 14
  • Serialization

    Serialization

    The modelfield is not JSON serializable out fo the box. Custom solutions have to be used to make it so or else it raises an error as below ๐Ÿ‘ :

      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/encoder.py", line 179, in default
        raise TypeError(f'Object of type {o.__class__.__name__} '
    TypeError: Object of type PhoneNumber is not JSON serializable
    

    Suggest it is implemented out of the box for use with Django Rest Framework.

    opened by jerryshikanga 13
  • Default Country Code?

    Default Country Code?

    Is there a way append a default country code? If no Country code is typed? I am thinking along the lines of, mobile = PhoneNumberField(required=True, country='india') or mobile = PhoneNumberField(required=True, country='+91') My users are not smart enough to add their own country code, sometimes. It raises few errors. I currently tell them add the country code in a html placeholder.

    opened by CT83 12
  • Add a new widget for smart switching between national and international formats

    Add a new widget for smart switching between national and international formats

    Currently, if using PHONENUMBER_DEFAULT_FORMAT = 'NATIONAL' numbers that are entered in international format lose their country information on loading the form, meaning they cannot be validated. This widget checks if the number provided is in the expected region and renders it in national format if so, or international if there's a mismatch.

    opened by MatthewWilkes 11
  • Several improvements

    Several improvements

    I made several little tweaks to the field. There were a few subtle bugs introduced in recent commits, which should be fixed. I also gave the test suite some love. Two features were added; specificing PHONENUMBER_DEFAULT_FORMAT (instead of defaulting to E164), and hinting at the region when using parse_string.

    I've added a note on null=True being discouraged for usage with the PhoneNumberField. As with CharFields, in most cases one doesn't want two different "empty" statuses, '' and None.

    I suggest making PhoneNumberField stricter, only accepting valid phone numbers by default. But that's a backwards-incompatible change and should be discussed.

    opened by maiksprenger 11
  • Normal Nigerian number should be 10 digits long excluding country code

    Normal Nigerian number should be 10 digits long excluding country code

    I am currently faced with the issue of validating Nigerian numbers. Normally, a typical Nigerian number is +234 XXX XXX XXXX or 0XX XXX XXX XX and when I test the formatted number against this regex r'^(0|\+234)[0-9]{10}', I always get this assertion error

    AssertionError: Lists differ: [ErrorDetail(string=*Enter a valid phone number.', code='invalid')] != ['... phone number cannot be the same as your phone number.']
    

    My settings.py has PHONENUMBER_DEFAULT_REGION = 'NG', and I tested my regex against the return value of phonenumbers.format_number( phonenumbers.parse(str(value), settings.PHONENUMBER_DEFAULT_REGION), phonenumbers.PhoneNumberFormat.E164 )

    opened by Sirneij 10
  • Can not install `django-phonenumber-field` properly with `pipenv`

    Can not install `django-phonenumber-field` properly with `pipenv`

    Original issue: https://github.com/pypa/pipenv/issues/1322

    When installing django-phonenumber-field strange issue happens. When running direct pipenv install django-phonenumber-field everything works fine. But when another developer tries to install the requirements from Pipfile, for some reason package phonenumberslite is missing.

    I feel like this line in setup.py is the cause of this issue: https://github.com/stefanfoulis/django-phonenumber-field/blob/master/setup.py#L8

    Here are the Pipfile and Pipfile.lock:

    [[source]]
    
    url = "https://pypi.python.org/simple"
    verify_ssl = true
    name = "pypi"
    
    
    [packages]
    
    django-phonenumber-field = "*"
    
    
    [dev-packages]
    
    
    {
        "_meta": {
            "hash": {
                "sha256": "1d4c4482eaa30ae2c0c4f7a2391984c1572af4984fa202fd3b5bbfbe37f6f7ac"
            },
            "host-environment-markers": {
                "implementation_name": "cpython",
                "implementation_version": "3.6.4",
                "os_name": "posix",
                "platform_machine": "x86_64",
                "platform_python_implementation": "CPython",
                "platform_release": "15.6.0",
                "platform_system": "Darwin",
                "platform_version": "Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64",
                "python_full_version": "3.6.4",
                "python_version": "3.6",
                "sys_platform": "darwin"
            },
            "pipfile-spec": 6,
            "requires": {},
            "sources": [
                {
                    "name": "pypi",
                    "url": "https://pypi.python.org/simple",
                    "verify_ssl": true
                }
            ]
        },
        "default": {
            "babel": {
                "hashes": [
                    "sha256:ad209a68d7162c4cff4b29cdebe3dec4cef75492df501b0049a9433c96ce6f80",
                    "sha256:8ce4cb6fdd4393edd323227cba3a077bceb2a6ce5201c902c65e730046f41f14"
                ],
                "version": "==2.5.3"
            },
            "django": {
                "hashes": [
                    "sha256:52475f607c92035d4ac8fee284f56213065a4a6b25ed43f7e39df0e576e69e9f",
                    "sha256:d96b804be412a5125a594023ec524a2010a6ffa4d408e5482ab6ff3cb97ec12f"
                ],
                "version": "==2.0.1"
            },
            "django-phonenumber-field": {
                "hashes": [
                    "sha256:d96c274a6aa9afd4eb4fe922e475a45706d997b2bea22b87f3afc9fb0012db84"
                ],
                "version": "==2.0.0"
            },
            "pytz": {
                "hashes": [
                    "sha256:80af0f3008046b9975242012a985f04c5df1f01eed4ec1633d56cc47a75a6a48",
                    "sha256:feb2365914948b8620347784b6b6da356f31c9d03560259070b2f30cff3d469d",
                    "sha256:59707844a9825589878236ff2f4e0dc9958511b7ffaae94dc615da07d4a68d33",
                    "sha256:d0ef5ef55ed3d37854320d4926b04a4cb42a2e88f71da9ddfdacfde8e364f027",
                    "sha256:c41c62827ce9cafacd6f2f7018e4f83a6f1986e87bfd000b8cfbd4ab5da95f1a",
                    "sha256:8cc90340159b5d7ced6f2ba77694d946fc975b09f1a51d93f3ce3bb399396f94",
                    "sha256:dd2e4ca6ce3785c8dd342d1853dd9052b19290d5bf66060846e5dc6b8d6667f7",
                    "sha256:699d18a2a56f19ee5698ab1123bbcc1d269d061996aeb1eda6d89248d3542b82",
                    "sha256:fae4cffc040921b8a2d60c6cf0b5d662c1190fe54d718271db4eb17d44a185b7"
                ],
                "version": "==2017.3"
            }
        },
        "develop": {}
    }
    
    
    Describe your environment
    1. OS Type: macos
    2. Python version: 3.6.4
    3. Pipenv version: 9.0.1
    Expected result

    I expect that django-phonenumber-field and all its dependencies will be installed.

    Actual result

    phonenumberslite is not installed.

    Steps to replicate
    1. pipenv install django-phonenumber-field
    2. pipenv run pip freeze, you will see something like:
    Babel==2.5.3
    Django==2.0.1
    django-phonenumber-field==2.0.0
    phonenumberslite==8.8.9
    pytz==2017.3
    
    1. pipenv --rm (we simulate a situation when we have to use Pipfile for installing dependencies)
    2. pipenv install
    3. pipenv run pip freeze, you will see something like this:
    Babel==2.5.3
    Django==2.0.1
    django-phonenumber-field==2.0.0
    pytz==2017.3
    
    opened by sobolevn 10
  • Add by region lookup method for phonenumberfields

    Add by region lookup method for phonenumberfields

    Phone numbers can be found using associated region like 'FR', 'UK', 'US', etc.

    queryset.filter(phone_number_field__region='FR)
    queryset.get(phone_numer_field__region='UK')
    

    Using startswith pattern with region codes

    LIKE '+44%';
    
    opened by cmehay 9
  • If blank=True, it's impossible to save an empty phone number

    If blank=True, it's impossible to save an empty phone number

    If you define a field like this in your models.py:

        faxnumber = PhoneNumberField(u'Fax',max_length=40,blank=True)
    
    You'll have this backtrace:
    
    Environment:
    
    
    Request Method: POST
    Request URL: http://morphee.hq.eyepea.be:8001/admin/xivo_web/entity/3/
    
    Django Version: 1.3.1
    Python Version: 2.5.2
    Installed Applications:
    ['django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django.contrib.admin',
     'xivo_web']
    Installed Middleware:
    ('django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware')
    
    
    Traceback:
    File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
      111.                         response = callback(request, *callback_args, **callback_kwargs)
    File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in wrapper
      307.                 return self.admin_site.admin_view(view)(*args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/utils/decorators.py" in _wrapped_view
      93.                     response = view_func(request, *args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
      79.         response = view_func(request, *args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in inner
      197.             return view(request, *args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/utils/decorators.py" in _wrapper
      28.             return bound_func(*args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/utils/decorators.py" in _wrapped_view
      93.                     response = view_func(request, *args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/utils/decorators.py" in bound_func
      24.                 return func(self, *args2, **kwargs2)
    File "/usr/lib/python2.5/site-packages/django/db/transaction.py" in inner
      217.                 res = func(*args, **kwargs)
    File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in change_view
      982.                 self.save_model(request, new_object, form, change=True)
    File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in save_model
      665.         obj.save()
    File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in save
      460.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)
    File "/usr/lib/python2.5/site-packages/django/db/models/base.py" in save_base
      526.                         rows = manager.using(using).filter(pk=pk_val)._update(values)
    File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in _update
      491.         return query.get_compiler(self.db).execute_sql(None)
    File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
      869.         cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
    File "/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
      735.         cursor.execute(sql, params)
    File "/usr/lib/python2.5/site-packages/django/db/backends/util.py" in execute
      34.             return self.cursor.execute(sql, params)
    File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py" in execute
      86.             return self.cursor.execute(query, args)
    File "/var/lib/python-support/python2.5/MySQLdb/cursors.py" in execute
      168.         if not self._defer_warnings: self._warning_check()
    File "/var/lib/python-support/python2.5/MySQLdb/cursors.py" in _warning_check
      82.                     warn(w[-1], self.Warning, 3)
    File "/usr/lib/python2.5/warnings.py" in warn
      62.                   globals)
    File "/usr/lib/python2.5/warnings.py" in warn_explicit
      102.         raise message
    
    Exception Type: Warning at /admin/xivo_web/entity/3/
    Exception Value: Column 'faxnumber' cannot be null
    
    opened by GMLudo 9
  • Converting existing `CharFields` to `PhoneNumberField` with intact lookup

    Converting existing `CharFields` to `PhoneNumberField` with intact lookup

    When converting from:

    class MyModel(Model):
         phone = CharField()
    

    to

    class MyModel(Model):
         phone = PhoneNumberField()
    

    The old data is not lost. However, a lookup like:

    my_result = MyModel.objects.filter(phone=PhoneNumber.from_string('+31629322282'))
    

    does not yield any result; after re-saving all entries by doing:

    for m in MyModel.objects.all():
        m.save()
    

    The lookup does work. My guess is that when migrating from a Charfield to a PhoneNumberField some format conversion is not done. It would make sense that an AlterField operation in the migrations would convert the old values to the new values via PhoneNumber.from_string().

    It is possible for the programmer to do this themselves through a custom migration of course.

    Should this functionality be automatic?

    opened by lmbak 1
  • Formatting being lost

    Formatting being lost

    I recently upgraded to django-phonenumber-field[phonenumbers]==7.0.0 and now all my phone numbers, previously formatted like (800) 123-4567, are being reformatted as +18001234567.

    Do you know why this is?

    Is there a new flag or formatting template I should set to maintain my preferred format?

    opened by chrisspen 5
  • Document E164 lack of support for phone extensions

    Document E164 lack of support for phone extensions

    While changing the default is likely to cause large breakage, we can at least advertise that limitation and allow people to pick the INTERNATIONAL format (E163) if they need to support extensions.

    Fixes #205

    opened by francoisfreitag 0
  • Problem to validate short business numbers

    Problem to validate short business numbers

    Hi,

    I just tried django-phonenumber-field in my project and it seems so good. but I have problem to enter short numbers specially 4 or 5 digit numbers that used to use for business call centers.

    Is there any settings that let me validate such numbers or it need a hack?

    opened by Ali-Javanmardi 4
Releases(7.0.1)
  • 7.0.1(Dec 6, 2022)

    What's Changed

    • Allow multiple DRF is_valid calls to succeed by @phillipuniverse in https://github.com/stefanfoulis/django-phonenumber-field/pull/543

    New Contributors

    • @phillipuniverse made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/543

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.0.0...7.0.1

    Source code(tar.gz)
    Source code(zip)
  • 7.0.0(Sep 7, 2022)

    Possible backward incompatibilities

    • RegionalPhoneNumberWidget becomes the default widget for the formfields.PhoneNumberField.
    • The formfields.PhoneNumberField no longer sets the input_type attribute of its widget to tel. That behavior did not make sense for the existing PhoneNumberPrefixWidget and was dropped.
    • PhoneNumberInternationalFallbackWidget will be replaced by RegionalPhoneNumberWidget in the next major version. It is deprecated until the next major release.

    Changes

    • Restore PhoneNumberPrefixWidget number input on form errors by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/520

      Fixes a bug where the form field prepare_value() transformed the PhoneNumber value to an str in the national format, but PhoneNumberPrefixWidget expects its value to be a PhoneNumber. formfields.PhoneNumberField now represents its value with a PhoneNumber object, giving widgets more control on how to display the value.

      That behavior prompted the change to PhoneNumberInternationalFallbackWidget becoming the default widget, to preserve the behavior established in https://github.com/stefanfoulis/django-phonenumber-field/commit/005769cf39323e5b23710783f45befb546672cd6. Switching to the widget allows users to opt-out from that behavior (e.g. by using a TextInput widget), whereas prepare_value() forced the conversion to the national string format.

    • Set PhoneNumberInternationalFallbackWidget input_type to tel by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/521

      Previously, the <input> from the PhoneNumberInternationalFallbackWidget was set to text.

    • Evolve PhoneNumberInternationalWidget to RegionalPhoneNumberWidget by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/529

      The newer widget gives more control over the display of phone numbers. The behavior of PhoneNumberInternaltionalWidget can be retained by setting PHONENUMBER_DEFAULT_FORMAT="INTERNATIONAL", which is why PhoneNumberInternaltionalWidget will be removed in the next major version.

    • Add Dutch translation by @thijskramer in https://github.com/stefanfoulis/django-phonenumber-field/pull/532

    • Add documentation and host it at readthedocs.org by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/531

    • Prefer SUPPORTED_REGIONS over _AVAILABLE_REGION_CODES by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/528

    New Contributors

    • @thijskramer made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/532

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.4.0...7.0.0

    Source code(tar.gz)
    Source code(zip)
    django-phonenumber-field-7.0.0.tar.gz(39.79 KB)
    django_phonenumber_field-7.0.0-py3-none-any.whl(64.15 KB)
  • 6.4.0(Aug 28, 2022)

    What's Changed

    • Allow restricting PhoneNumberPrefixWidget country choices by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/525
    • Handle empty input to PhoneNumberPrefixWidget by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/512
    • Handle primitive types in serializerfields by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/523
    • Implement region argument for serializerfields by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/519
    • Fix CHANGELOG link to GitHub Releases by @adamchainz in https://github.com/stefanfoulis/django-phonenumber-field/pull/507
    • Add compatibility with Django 4.1 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/516
    • Drop support for end-of-life Django 2.2 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/515

    New Contributors

    • @adamchainz made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/507

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.3.0...6.4.0

    Source code(tar.gz)
    Source code(zip)
  • 6.3.0(Jun 17, 2022)

    What's Changed

    • Accept per-widget attrs for PhoneNumberPrefixWidget by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/502
    • Drop Django 3.1 support by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/505

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.2.0...6.3.0

    Source code(tar.gz)
    Source code(zip)
  • 6.2.0(Jun 14, 2022)

    What's Changed

    • PhoneNumberPrefixWidget improvement for regions sharing same country prefix by @amateja in https://github.com/stefanfoulis/django-phonenumber-field/pull/493
    • Remove maxlength attribute for html5 compliance by @sterliakov in https://github.com/stefanfoulis/django-phonenumber-field/pull/490
    • Better syntax highlighting by @bashu in https://github.com/stefanfoulis/django-phonenumber-field/pull/498
    • Update Polish translation by @amateja in https://github.com/stefanfoulis/django-phonenumber-field/pull/500
    • Update Lithuanian translations by @KiraLT in https://github.com/stefanfoulis/django-phonenumber-field/pull/390
    • Update Portuguese translations by @AndreMorais98 in https://github.com/stefanfoulis/django-phonenumber-field/pull/504

    New Contributors

    • @bashu made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/498
    • @KiraLT made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/390
    • @sterliakov made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/490
    • @AndreMorais98 made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/504

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.1.0...6.2.0

    Source code(tar.gz)
    Source code(zip)
  • 6.1.0(Feb 15, 2022)

    What's Changed

    Features

    • Make formfields.PhoneNumberField honor PHONENUMBER_DEFAULT_REGION by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/476
    • Use the default regionโ€™s format in form errors by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/483

    Translations

    • Update and translate uk_AR locale. by @trufanovoleh in https://github.com/stefanfoulis/django-phonenumber-field/pull/360
    • Add persian(farsi) translation by @maktoobgar in https://github.com/stefanfoulis/django-phonenumber-field/pull/479
    • Update turkish translations by @realsuayip in https://github.com/stefanfoulis/django-phonenumber-field/pull/487

    Versioning

    • Add support for Django 4.0 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/478
    • Drop support for Python 3.6 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/482

    Miscellaneous

    • Remove unnecessary STR cast from PhoneNumber.__repr__ by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/485
    • Prefer f-string to format strings by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/484
    • Cleanup import in tests by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/475

    New Contributors

    • @trufanovoleh made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/360
    • @maktoobgar made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/479

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.0.0...6.1.0

    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Nov 10, 2021)

    What's Changed

    • Add support for Python 3.10
    • Update Czech, Dutch and pt_BR translations

    Backwards incompatible changes

    • formfields.PhoneNumberField with a region now display national phone numbers in the national format instead of PHONENUMBER_DEFAULT_FORMAT. International numbers are displayed in the PHONENUMBER_DEFAULT_FORMAT.

    New Contributors

    • @maartenkling made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/449
    • @melanger made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/454
    • @willunicamp made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/456
    • @fraimondo made their first contribution in https://github.com/stefanfoulis/django-phonenumber-field/pull/469

    Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/5.2.0...6.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Stefan Foulis
/me โค๏ธ [Python, Django, Docker]
Stefan Foulis
A simple Django dev environment setup with docker for demo purposes for GalsenDev community

GalsenDEV Docker Demo This is a basic Django dev environment setup with docker and docker-compose for a GalsenDev Meetup. The main purposes was to mak

3 Jul 03, 2021
E-Commerce Platform

Shuup Shuup is an Open Source E-Commerce Platform based on Django and Python. https://shuup.com/ Copyright Copyright (c) 2012-2021 by Shuup Commerce I

Shuup 2k Jan 07, 2023
Extensions for using Rich with Django.

django-rich Extensions for using Rich with Django. Requirements Python 3.6 to 3.10 supported. Django 2.2 to 4.0 supported. Are your tests slow? Check

Adam Johnson 88 Dec 26, 2022
A pickled object field for Django

django-picklefield About django-picklefield provides an implementation of a pickled object field. Such fields can contain any picklable objects. The i

Gintautas Miliauskas 167 Oct 18, 2022
Exploit Discord's cache system to remote upload payloads on Discord users machines

Exploit Discord's cache system to hide payloads PoC Remote upload embedded payload from image using EOF to Discord users machines through cache. Depen

cs 169 Dec 20, 2022
wagtail_tenants is a Django/Wagtail app to provide multitenancy to your wagtail project.

wagtail-tenants wagtail_tenants is a Django/Wagtail app to provide multitenancy to your wagtail project. You are able to run a main Wagtail Site and f

<bbr> 11 Nov 20, 2022
Use heroicons in your Django and Jinja templates.

heroicons Use heroicons in your Django and Jinja templates. Requirements Python 3.6 to 3.9 supported. Django 2.2 to 3.2 supported. Are your tests slow

Adam Johnson 52 Dec 14, 2022
Send push notifications to mobile devices through GCM or APNS in Django.

django-push-notifications A minimal Django app that implements Device models that can send messages through APNS, FCM/GCM and WNS. The app implements

Jazzband 2k Dec 26, 2022
Rosetta is a Django application that eases the translation process of your Django projects

Rosetta Rosetta is a Django application that facilitates the translation process of your Django projects. Because it doesn't export any models, Rosett

Marco Bonetti 909 Dec 26, 2022
Django React Flight Rezervation

Django Intro & Installation python -m venv venv source ./venv/Scripts/activate pip install Django pip install djangorestframework pip install python-d

HILMI SARIOGLU 2 May 26, 2022
Twitter-clone using Django (DRF) + VueJS

Twitter Clone work in progress ๐Ÿšง A Twitter clone project Table Of Contents About the Project Built With Getting Started Running project License Autho

Ahmad Alwi 8 Sep 08, 2022
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

Victor Aderibigbe 18 Sep 09, 2022
Docker django app

Hmmmmm... What I should write here? Maybe "Hello World". Hello World Build Docker compose: sudo docker-compose build Run Docker compose: sudo docker-

Andrew 0 Nov 10, 2022
Auth module for Django and GarpixCMS

Garpix Auth Auth module for Django/DRF projects. Part of GarpixCMS. Used packages: django rest framework social-auth-app-django django-rest-framework-

GARPIX CMS 18 Mar 14, 2022
This is a sample Django Form.

Sample FORM Installation guide Clone repository git clone https://github.com/Ritabratadas343/SampleForm.git cd to repository. Create a virtualenv by f

Ritabrata Das 1 Nov 05, 2021
Django Pickled Model

Django Pickled Model Django pickled model provides you a model with dynamic data types. a field can store any value in any type. You can store Integer

Amir 3 Sep 14, 2022
Django based webapp pulling in crypto news and price data via api

Deploy Django in Production FTA project implementing containerization of Django Web Framework into Docker to be placed into Azure Container Services a

0 Sep 21, 2022
A Django web application that allows you to be in the loop about everything happening in your neighborhood.

A Django web application that allows you to be in the loop about everything happening in your neighborhood. From contact information of different handyman to meeting announcements or even alerts.

Kennedy Ngugi Mwaura 3 Dec 11, 2022
๐Ÿ—‚๏ธ ๐Ÿ” Geospatial Data Management and Search API - Django Apps

Geospatial Data API in Django Resonant GeoData (RGD) is a series of Django applications well suited for cataloging and searching annotated geospatial

Resonant GeoData 53 Nov 01, 2022
๐Ÿ’จ Fast, Async-ready, Openapi, type hints based framework for building APIs

Fast to learn, fast to code, fast to run Django Ninja - Fast Django REST Framework Django Ninja is a web framework for building APIs with Django and P

Vitaliy Kucheryaviy 3.8k Jan 01, 2023