Hello alain31,

On 12 Aug., 21:41, alain31 <[email protected]> wrote:
> [...]
> How can I use a custom QuerySet for the choices of field1  ?

I think it should work like this:

myform = MyForm(......)
myqueryset = myform.base_fields['field1'].queryset
myqueryset = myqueryset.filter_by(somefield='somevalue')
myform.base_fields['field1'].queryset = myqueryset

Regards,
-Stephan


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