Re: which class does ####__iexact belong to, where #### is the attribute of a model?

2009-01-11 Thread bruno desthuilliers
On 10 jan, 18:56, rabbi wrote: > Hi, > I'm trying to write a generic filter function do something like > following: >MyModel.objects.filter( getattr(???,my_dict['search_field'] > +'__iexact')=my_dict['search_value'] ) > > But I don't know what to put in place of

Re: which class does ####__iexact belong to, where #### is the attribute of a model?

2009-01-10 Thread rabbi
High 5! :-) On Jan 10, 7:30 pm, Christian Joergensen wrote: > rabbi wrote: > > Hi, > > I'm trying to write a generic filter function do something like > > following: > >    MyModel.objects.filter(   getattr(???,my_dict['search_field'] > > +'__iexact')=my_dict['search_value']   )

Re: which class does ####__iexact belong to, where #### is the attribute of a model?

2009-01-10 Thread Christian Joergensen
rabbi wrote: > Hi, > I'm trying to write a generic filter function do something like > following: >MyModel.objects.filter( getattr(???,my_dict['search_field'] > +'__iexact')=my_dict['search_value'] ) > > But I don't know what to put in place of '???' > Where does 'field__iexact' actually

which class does ####__iexact belong to, where #### is the attribute of a model?

2009-01-10 Thread rabbi
Hi, I'm trying to write a generic filter function do something like following: MyModel.objects.filter( getattr(???,my_dict['search_field'] +'__iexact')=my_dict['search_value'] ) But I don't know what to put in place of '???' Where does 'field__iexact' actually come from? Is it part of