On Fri, May 14, 2010 at 8:37 AM, Nuno Maltez <nuno.li...@gmail.com> wrote:
> Sure: 
> http://docs.python.org/tutorial/controlflow.html#unpacking-argument-lists
>
> myfilter = { var_field: "found" }
> Foo.objects.filter(**myfilter}

or even:

Foo.objects.filter (**{var_field+'__eq':'found'})


if you want to use a different operator instead of the default '__eq'


-- 
Javier

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

Reply via email to