@ -6,8 +6,12 @@ class EmptyForm(forms.Form):
pass
class NameField(forms.ModelChoiceField):
def label_from_instance(self, user):
return f"{user.name} ({(str(user.phone))[-3:]})"
class HelperShift(forms.Form):
helper = forms.ModelChoiceField(
helper = NameField(
label="Helfer*in", queryset=Helper.objects.order_by("name")
)