* Benedict Verheyen wrote, On 12.02.2007 12:03:
> Benedict Verheyen schreef:
>
>
> I almost succeeded in getting there.
> I can get the rooms i want via this command:
>
> r = models.ForeignKey(Room, blank=True, null=True, limit_choices_to =
> Room.objects.exclude(id__in=[patient.room.id for pat
Benedict Verheyen schreef:
I almost succeeded in getting there.
I can get the rooms i want via this command:
r = models.ForeignKey(Room, blank=True, null=True, limit_choices_to =
Room.objects.exclude(id__in=[patient.room.id for patient in
Patient.objects.filter(room__isnull=False)]) )
However,
Nebojša Đorđević schreef:
> On Feb 9, 2007, at 09:32 , Benedict Verheyen wrote:
>
>
> Have you tried `limit_choices_to` (http://www.djangoproject.com/
> documentation/model_api/#many-to-one-relationships) to filter out all
> of the used beds from the select list.
>
> Do you use Django admin
Nebojša Đorđević schreef:
>
> Have you tried `limit_choices_to` (http://www.djangoproject.com/
> documentation/model_api/#many-to-one-relationships) to filter out all
> of the used beds from the select list.
>
> Do you use Django admin interface or the custom form?
Hi,
no i haven't tried l
On Feb 9, 2007, at 09:32 , Benedict Verheyen wrote:
> my app is used to manage patients of a ward in a hospital.
> This ward has a number of beds available.
> A patient has a room id referring to the room/bed where he's laying.
>
> Now i would want to avoid being able to select a bed that is
>
5 matches
Mail list logo