On améliore l'allure du formulaire (tri des catégories)

This commit is contained in:
Jean-Marie Favreau 2024-10-16 11:14:14 +02:00
parent 83abaec4f4
commit 2253fc50b4

View File

@ -110,6 +110,7 @@ class EventForm(ModelForm):
super().__init__(*args, **kwargs)
if not is_authenticated:
del self.fields["status"]
self.fields['category'].queryset = self.fields['category'].queryset.order_by('name')
def clean_end_day(self):
start_day = self.cleaned_data.get("start_day")