Merge pull request #451 from ae-utbm/django-3.2-migration

Edited deprecated code
This commit is contained in:
Théo DURR 2022-08-27 00:17:36 +02:00 committed by GitHub
commit 7a914f5e94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -68,9 +68,17 @@ class SubscriptionForm(forms.ModelForm):
)
self.fields["email"] = forms.EmailField()
self.fields["date_of_birth"] = forms.DateTimeField(widget=SelectDate)
self.fields.move_to_end("subscription_type")
self.fields.move_to_end("payment_method")
self.fields.move_to_end("location")
self.field_order = [
"member",
"last_name",
"first_name",
"email",
"date_of_birth",
"subscription_type",
"payment_method",
"location",
]
def clean_member(self):
subscriber = self.cleaned_data.get("member")