pypi django-phonenumber-field 7.0.0

latest releases: 8.0.0, 7.3.0, 7.2.0...
2 years ago

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 #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 005769c. 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 #521

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

  • Evolve PhoneNumberInternationalWidget to RegionalPhoneNumberWidget by @francoisfreitag in #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 #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

Full Changelog: 6.4.0...7.0.0

Don't miss a new django-phonenumber-field release

NewReleases is sending notifications on new releases.