mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Edited deprecated code
Fixes #449 See : https://docs.djangoproject.com/en/3.2/ref/forms/api/\#notes-on-field-ordering
This commit is contained in:
parent
997fcc9fff
commit
142cb3316e
@ -68,9 +68,17 @@ class SubscriptionForm(forms.ModelForm):
|
|||||||
)
|
)
|
||||||
self.fields["email"] = forms.EmailField()
|
self.fields["email"] = forms.EmailField()
|
||||||
self.fields["date_of_birth"] = forms.DateTimeField(widget=SelectDate)
|
self.fields["date_of_birth"] = forms.DateTimeField(widget=SelectDate)
|
||||||
self.fields.move_to_end("subscription_type")
|
|
||||||
self.fields.move_to_end("payment_method")
|
self.field_order = [
|
||||||
self.fields.move_to_end("location")
|
"member",
|
||||||
|
"last_name",
|
||||||
|
"first_name",
|
||||||
|
"email",
|
||||||
|
"date_of_birth",
|
||||||
|
"subscription_type",
|
||||||
|
"payment_method",
|
||||||
|
"location",
|
||||||
|
]
|
||||||
|
|
||||||
def clean_member(self):
|
def clean_member(self):
|
||||||
subscriber = self.cleaned_data.get("member")
|
subscriber = self.cleaned_data.get("member")
|
||||||
|
Loading…
Reference in New Issue
Block a user