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