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.

Change-Id: Ib3a631a3626977a2e7114dac217aacd523354c53
This commit is contained in:
Akihiro Motoki 2021-02-24 21:36:49 +09:00 committed by Vishal Manchanda
parent 6dfcb90131
commit be12ce1e96
1 changed files with 2 additions and 2 deletions

View File

@ -296,8 +296,8 @@ 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",
"password", "confirm_password"]
self.field_order = ["id", "name", "admin_password",
"password", "confirm_password"]
@sensitive_variables('data', 'password', 'admin_password')
def handle(self, request, data):