amélioration UX ajout lieu
This commit is contained in:
parent
8119ea98cd
commit
32bde7d3a8
@ -295,7 +295,7 @@ class CategorisationForm(Form):
|
|||||||
|
|
||||||
class EventAddPlaceForm(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)
|
add_alias = BooleanField(initial=True, required=False)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -171,7 +171,7 @@ class Place(models.Model):
|
|||||||
verbose_name_plural = _('Places')
|
verbose_name_plural = _('Places')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name + ", " + self.address
|
return self.name + ", " + self.address + ", " + self.city
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse("view_place", kwargs={"pk": self.pk})
|
return reverse("view_place", kwargs={"pk": self.pk})
|
||||||
|
Loading…
Reference in New Issue
Block a user