keyOrder is deprecated, using a list in Meta gives the correct order

This commit is contained in:
Tom Hubrecht 2022-06-28 22:56:40 +02:00
parent 65ea5d21b2
commit 3411bc8a00

View file

@ -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"),