A django model and form field for normalised phone numbers using python-phonenumbers
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.2.0...7.3.0
Published by francoisfreitag about 1 year ago
Add a DB converter for the model field, fixing values_list()
of PhoneNumberField
s by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/559
Use public attributes and methods from phonenumbers by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/535
Remove zip_safe flag from setup.cfg by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/553
feat: Add mypy to CI by @last-partizan in https://github.com/stefanfoulis/django-phonenumber-field/pull/563
Drop support for Python 3.7 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/561
Show support for Python 3.11 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/570
Add support for Python 3.12 by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/576
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.1.0...7.2.0
Published by francoisfreitag over 1 year ago
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.0.2...7.1.0
Published by francoisfreitag almost 2 years ago
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.0.1...7.0.2
Published by francoisfreitag almost 2 years ago
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/7.0.0...7.0.1
Published by francoisfreitag about 2 years ago
RegionalPhoneNumberWidget
becomes the default widget for the formfields.PhoneNumberField
.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.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
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.4.0...7.0.0
Published by francoisfreitag about 2 years ago
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.3.0...6.4.0
Published by francoisfreitag over 2 years ago
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.2.0...6.3.0
Published by francoisfreitag over 2 years ago
PhoneNumberPrefixWidget
improvement for regions sharing same country prefix by @amateja in https://github.com/stefanfoulis/django-phonenumber-field/pull/493
maxlength
attribute for html5 compliance by @sterliakov in https://github.com/stefanfoulis/django-phonenumber-field/pull/490
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.1.0...6.2.0
Published by francoisfreitag over 2 years ago
formfields.PhoneNumberField
honor PHONENUMBER_DEFAULT_REGION
by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/476
PhoneNumber.__repr__
by @francoisfreitag in https://github.com/stefanfoulis/django-phonenumber-field/pull/485
Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/6.0.0...6.1.0
Published by francoisfreitag almost 3 years ago
Backwards incompatible changes
formfields.PhoneNumberField
with a region
now display national phonePHONENUMBER_DEFAULT_FORMAT
.PHONENUMBER_DEFAULT_FORMAT
.Full Changelog: https://github.com/stefanfoulis/django-phonenumber-field/compare/5.2.0...6.0.0