Releases: stefanfoulis/django-phonenumber-field
7.3.0
What's Changed
- Add support for Django 5.0 by @adamchainz in #582
- Document phone number extension handling by @francoisfreitag in #583
- Make PhoneNumberPrefixSelect use the provided region by @francoisfreitag in #593
- Update Italian locale by @RuggeroFabbiano in #594
New Contributors
- @RuggeroFabbiano made their first contribution in #594
Full Changelog: 7.2.0...7.3.0
7.2.0
This release should have been an 8.0 by the semver, as the DB converter for the model field can break working code.
What's Changed
-
BREAKING: Add a DB converter for the model field, fixing
values_list()
ofPhoneNumberField
s by @francoisfreitag in #559 -
Use public attributes and methods from phonenumbers by @francoisfreitag in #535
-
Remove zip_safe flag from setup.cfg by @francoisfreitag in #553
-
feat: Add mypy to CI by @last-partizan in #563
-
Drop support for Python 3.7 by @francoisfreitag in #561
-
Show support for Python 3.11 by @francoisfreitag in #570
-
Add support for Python 3.12 by @francoisfreitag in #576
New Contributors
- @dependabot made their first contribution in #555
- @last-partizan made their first contribution in #563
Full Changelog: 7.1.0...7.2.0
7.1.0
What's Changed
- Update Norwegian translations by @ddabble in #549
- Drop support for Django 4.0, add Django 4.2 by @francoisfreitag in #550
Miscellaneous
- Update python and Django matrix by @francoisfreitag in #548
- Add common virtualenv locations to flake8 exclude and .gitignore by @blaedd in #547
- Document E164 lack of support for phone extensions by @francoisfreitag in #537
- Strip trailing line from beautifulsoup prettify output by @francoisfreitag in #551
New Contributors
Full Changelog: 7.0.2...7.1.0
7.0.2
7.0.1
What's Changed
- Allow multiple DRF is_valid calls to succeed by @phillipuniverse in #543
New Contributors
- @phillipuniverse made their first contribution in #543
Full Changelog: 7.0.0...7.0.1
7.0.0
Possible backward incompatibilities
RegionalPhoneNumberWidget
becomes the default widget for theformfields.PhoneNumberField
.- The
formfields.PhoneNumberField
no longer sets theinput_type
attribute of its widget totel
. That behavior did not make sense for the existingPhoneNumberPrefixWidget
and was dropped. PhoneNumberInternationalFallbackWidget
will be replaced byRegionalPhoneNumberWidget
in the next major version. It is deprecated until the next major release.
Changes
-
Restore
PhoneNumberPrefixWidget
number input on form errors by @francoisfreitag in #520Fixes a bug where the form field
prepare_value()
transformed thePhoneNumber
value to anstr
in the national format, butPhoneNumberPrefixWidget
expects its value to be aPhoneNumber
.formfields.PhoneNumberField
now represents its value with aPhoneNumber
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 005769c. Switching to the widget allows users to opt-out from that behavior (e.g. by using aTextInput
widget), whereasprepare_value()
forced the conversion to the national string format. -
Set
PhoneNumberInternationalFallbackWidget
input_type
totel
by @francoisfreitag in #521Previously, the
<input>
from thePhoneNumberInternationalFallbackWidget
was set totext
. -
Evolve
PhoneNumberInternationalWidget
toRegionalPhoneNumberWidget
by @francoisfreitag in #529The newer widget gives more control over the display of phone numbers. The behavior of
PhoneNumberInternaltionalWidget
can be retained by settingPHONENUMBER_DEFAULT_FORMAT="INTERNATIONAL"
, which is whyPhoneNumberInternaltionalWidget
will be removed in the next major version. -
Add Dutch translation by @thijskramer in #532
-
Add documentation and host it at readthedocs.org by @francoisfreitag in #531
-
Prefer
SUPPORTED_REGIONS
over_AVAILABLE_REGION_CODES
by @francoisfreitag in #528
New Contributors
- @thijskramer made their first contribution in #532
Full Changelog: 6.4.0...7.0.0
6.4.0
What's Changed
- Allow restricting PhoneNumberPrefixWidget country choices by @francoisfreitag in #525
- Handle empty input to PhoneNumberPrefixWidget by @francoisfreitag in #512
- Handle primitive types in serializerfields by @francoisfreitag in #523
- Implement region argument for serializerfields by @francoisfreitag in #519
- Fix CHANGELOG link to GitHub Releases by @adamchainz in #507
- Add compatibility with Django 4.1 by @francoisfreitag in #516
- Drop support for end-of-life Django 2.2 by @francoisfreitag in #515
New Contributors
- @adamchainz made their first contribution in #507
Full Changelog: 6.3.0...6.4.0
6.3.0
What's Changed
- Accept per-widget attrs for PhoneNumberPrefixWidget by @francoisfreitag in #502
- Drop Django 3.1 support by @francoisfreitag in #505
Full Changelog: 6.2.0...6.3.0
6.2.0
What's Changed
PhoneNumberPrefixWidget
improvement for regions sharing same country prefix by @amateja in #493- Remove
maxlength
attribute for html5 compliance by @sterliakov in #490 - Better syntax highlighting by @bashu in #498
- Update Polish translation by @amateja in #500
- Update Lithuanian translations by @KiraLT in #390
- Update Portuguese translations by @AndreMorais98 in #504
New Contributors
- @bashu made their first contribution in #498
- @KiraLT made their first contribution in #390
- @sterliakov made their first contribution in #490
- @AndreMorais98 made their first contribution in #504
Full Changelog: 6.1.0...6.2.0
6.1.0
What's Changed
Features
- Make
formfields.PhoneNumberField
honorPHONENUMBER_DEFAULT_REGION
by @francoisfreitag in #476 - Use the default region’s format in form errors by @francoisfreitag in #483
Translations
- Update and translate uk_AR locale. by @trufanovoleh in #360
- Add persian(farsi) translation by @maktoobgar in #479
- Update turkish translations by @realsuayip in #487
Versioning
- Add support for Django 4.0 by @francoisfreitag in #478
- Drop support for Python 3.6 by @francoisfreitag in #482
Miscellaneous
- Remove unnecessary STR cast from
PhoneNumber.__repr__
by @francoisfreitag in #485 - Prefer f-string to format strings by @francoisfreitag in #484
- Cleanup import in tests by @francoisfreitag in #475
New Contributors
- @trufanovoleh made their first contribution in #360
- @maktoobgar made their first contribution in #479
Full Changelog: 6.0.0...6.1.0