Re: how to make a list of allowable arguments for filter()

2007-02-10 Thread Malcolm Tredinnick
On Fri, 2007-02-09 at 23:22 -0800, abe wrote: > > > > I really tried hard to understand your problem, but then my brain > > started to leak out of my ears and I had to stop. :-( > > > > Could you post an example of how all these models are related? You seem > > to have Relmodl2, model2 and model1

Re: how to make a list of allowable arguments for filter()

2007-02-09 Thread abe
> > I really tried hard to understand your problem, but then my brain > started to leak out of my ears and I had to stop. :-( > > Could you post an example of how all these models are related? You seem > to have Relmodl2, model2 and model1 and I'm not sure what all the > linkages are. > > I think

Re: how to make a list of allowable arguments for filter()

2007-02-09 Thread Malcolm Tredinnick
On Sat, 2007-02-10 at 00:41 +, abe wrote: > sorry for the previous post. accidentally pressed send too early. > > I can find the models which have a certain model as a ForeignKey like > this > > modl=models.get_model('myapp','model1') > > relfieldargs = ['%s__%s' %

Re: how to make a list of allowable arguments for filter()

2007-02-09 Thread abe
sorry for the previous post. accidentally pressed send too early. I can find the models which have a certain model as a ForeignKey like this modl=models.get_model('myapp','model1') relfieldargs = ['%s__%s' % (m.model._meta.module_name,f.name) for m in

how to make a list of allowable arguments for filter()

2007-02-09 Thread abe
I can find the models which have a certain model as a ForeignKey like this relfieldargs = ['%s__%s' % (m.model._meta.module_name,f.name) for m in models.get_model('zb','compound')._meta.get_all_related_objects() for f in m.model._meta.fields]