Re: Getting properties of parent objects into a template

2006-08-14 Thread mediumgrade
And I am a 'tard. I had pluralized the name of my author foreign key so that the actualy name of the foreign key was "authors" and not "author". Once I used {{ entry.authors.name }}, everything was fine. Still learning here, Dave --~--~-~--~~~---~--~~ Yo

Re: Getting properties of parent objects into a template

2006-08-14 Thread limodou
On 8/14/06, mediumgrade <[EMAIL PROTECTED]> wrote: > > Yes, that would be the relationship and that was actually the first > thing I tried. The template gets passed an "array" of "entry" objects. > Within the template, I loop through them printing the headline, portion > of the body, and the creat

Re: Getting properties of parent objects into a template

2006-08-13 Thread mediumgrade
Yes, that would be the relationship and that was actually the first thing I tried. The template gets passed an "array" of "entry" objects. Within the template, I loop through them printing the headline, portion of the body, and the created date. With Author's as a foreign key, I assumed you could

Re: Getting properties of parent objects into a template

2006-08-13 Thread Ivan Sagalaev
mediumgrade ÐÉÛÅÔ: > I have a simple blog app that I am working on. In this app, I have > ojects for each entry as well as the author who wrote it. I wrote a > simple view which displays a list of all entrys made, but I want that > list to include the name of the author. Since the author's name i

Re: Getting properties of parent objects into a template

2006-08-13 Thread Bryan Chow
Hi David, Not sure what you mean by "parent object". If author is a ForeignKey in your blog_entry model, and author has a field called full_name, then you should be able to use {{ blog_entry.author.full_name }}. Otherwise, you could just place author in the context that's passed to your template

Getting properties of parent objects into a template

2006-08-13 Thread mediumgrade
I have a simple blog app that I am working on. In this app, I have ojects for each entry as well as the author who wrote it. I wrote a simple view which displays a list of all entrys made, but I want that list to include the name of the author. Since the author's name is not part of the entry, ho