I had similar problem and i sort it out by overloading __init__ func
of my form and change queryset method of a field (ModelChoiceField),
i.e.:
self.fields[depatment].queryset =
self.fields[depatment].queryset.filter(company=selectedcompany)
Maybe it will help You with finding right solution.

On 17 Mar, 17:59, Thiago Carvalho D' Ávila <[email protected]>
wrote:
> Hi, I'm making one app with 3 classes: emploee, company and department.
>
> 1- When I edit an emploee I need to know his company, and after to have a
> field with all the departments from the selected company. But when I use
> ModelChoiceField I see all departments from all companies.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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