Re: All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-28 Thread JohnA
Kaplun wrote: > How do I get all models with FKs, M2Ms, or 121s pointing to a given > model? > > I am using djcelery. I have a BakedModel with a FK to TaskMeta, which > is the model that stores task status (I only care whether it is > complete). I want to generate a query set t

Re: All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-27 Thread Russell Keith-Magee
On Wed, Dec 28, 2011 at 10:01 AM, Daniel Kaplun wrote: > How do I get all models with FKs, M2Ms, or 121s pointing to a given > model? Looking at your pastebin, you've already discovered the _meta object -- you just needed to dig around a little more in there. The methods/attrib

All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-27 Thread Daniel Kaplun
How do I get all models with FKs, M2Ms, or 121s pointing to a given model? I am using djcelery. I have a BakedModel with a FK to TaskMeta, which is the model that stores task status (I only care whether it is complete). I want to generate a query set that will return all instances of a given