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:
parent
6dfcb90131
commit
be12ce1e96
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user