Support Django 3.0 and 3.1 support (2)
It seems Django 3.0+ does not allow to set an unknown attribute
to forms.Form.fields. "keyOrder" attribute has no meaning and
"field_order" of the Form class is the right way to configure
the order of fields.
@@ -296,7 +296,7 @@ class ChangePasswordForm(PasswordMixin, forms.SelfHandlingForm):
strip=False,
widget=forms.PasswordInput(render_value=False))
# Reorder form fields from multiple inheritance
- self.fields.keyOrder = ["id", "name", "admin_password",
+ self.field_order = ["id", "name", "admin_password",
"password", "confirm_password"]
@sensitive_variables('data', 'password', 'admin_password')
