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  
> already in use.

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?

-- 
Nebojša Đorđević - nesh, ICQ#43799892
Studio Quattro - Niš - Serbia
http://studioquattro.biz/ | http://trac.studioquattro.biz/djangoutils/
Registered Linux User 282159 [http://counter.li.org]



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to