I am using a ModelChoiceField (default_project) in a form and want the
initial queyset to change when the form is created.

I've tried doing it like this:

forms.py --
class UserAccountForm(forms.Form):
   .........
   default_project =
forms.ModelChoiceField(queryset=Project.objects.all(), required=False)
   ..........
views.py ---
form = form = UserAccountForm()
form.base_fields['default_project'].queryset = user.project_set.all()


But it doesn't change the choices in the form.
Is there some way I can achieve this?

Thanks

Sam


--~--~---------~--~----~------------~-------~--~----~
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