Re: Syntax for displaying field values from parent model(s) in a template?

2010-05-06 Thread derek
On May 5, 9:15 pm, Daniel Roseman wrote: > On May 5, 6:27 pm, Derek wrote: > > > > > I  have set of models, with relationships D -> C -> B -> A, where the > > "->" indicates a "many to one" relationship. > > > I have been able to create a filtered queryset on child model D, based > > on a value i

Re: Syntax for displaying field values from parent model(s) in a template?

2010-05-05 Thread Daniel Roseman
On May 5, 6:27 pm, Derek wrote: > I  have set of models, with relationships D -> C -> B -> A, where the > "->" indicates a "many to one" relationship. > > I have been able to create a filtered queryset on child model D, based > on a value in a parent model A, using the following syntax: > > my_que

Syntax for displaying field values from parent model(s) in a template?

2010-05-05 Thread Derek
I have set of models, with relationships D -> C -> B -> A, where the "->" indicates a "many to one" relationship. I have been able to create a filtered queryset on child model D, based on a value in a parent model A, using the following syntax: my_query = D.objects.filter(C__B__A__name__icontain