From 3411bc8a00ea1d31d7dd6f5a09bb549700e53e12 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 28 Jun 2022 22:56:40 +0200 Subject: [PATCH] keyOrder is deprecated, using a list in Meta gives the correct order --- gestioncof/forms.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/gestioncof/forms.py b/gestioncof/forms.py index 2a57f970..983bb249 100644 --- a/gestioncof/forms.py +++ b/gestioncof/forms.py @@ -276,7 +276,9 @@ class RegistrationProfileForm(forms.ModelForm): self.fields["mailing_bda_revente"].initial = True self.fields["mailing_unernestaparis"].initial = True - self.fields.keyOrder = [ + class Meta: + model = CofProfile + fields = [ "login_clipper", "phone", "occupation", @@ -290,22 +292,6 @@ class RegistrationProfileForm(forms.ModelForm): "comments", ] - class Meta: - model = CofProfile - fields = ( - "login_clipper", - "phone", - "occupation", - "departement", - "is_cof", - "type_cotiz", - "mailing_cof", - "mailing_bda", - "mailing_bda_revente", - "mailing_unernestaparis", - "comments", - ) - STATUS_CHOICES = ( ("no", "Non"),