From 32bde7d3a87c3c3982820e6d2bd78619da0dacd6 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 27 Apr 2024 19:41:43 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20UX=20ajout=20lieu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/forms.py | 2 +- src/agenda_culturel/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index d26aba3..10f0bb4 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -295,7 +295,7 @@ class CategorisationForm(Form): class EventAddPlaceForm(Form): - place = ModelChoiceField(label=_("Place"), queryset=Place.objects.all(), empty_label=_("Create a missing place"), required=False) + place = ModelChoiceField(label=_("Place"), queryset=Place.objects.all().order_by("name"), empty_label=_("Create a missing place"), required=False) add_alias = BooleanField(initial=True, required=False) def __init__(self, *args, **kwargs): diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index af87bed..883cd44 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -171,7 +171,7 @@ class Place(models.Model): verbose_name_plural = _('Places') def __str__(self): - return self.name + ", " + self.address + return self.name + ", " + self.address + ", " + self.city def get_absolute_url(self): return reverse("view_place", kwargs={"pk": self.pk})