On améliore l'allure du formulaire (tri des catégories)
This commit is contained in:
parent
83abaec4f4
commit
2253fc50b4
@ -110,6 +110,7 @@ class EventForm(ModelForm):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
if not is_authenticated:
|
if not is_authenticated:
|
||||||
del self.fields["status"]
|
del self.fields["status"]
|
||||||
|
self.fields['category'].queryset = self.fields['category'].queryset.order_by('name')
|
||||||
|
|
||||||
def clean_end_day(self):
|
def clean_end_day(self):
|
||||||
start_day = self.cleaned_data.get("start_day")
|
start_day = self.cleaned_data.get("start_day")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user