Re: Accessing custom model methods from template

2007-04-04 Thread James Earl
Oops, you're right! Thanks! James akonsu wrote: > hello, > > {{item.image}} is correct. > > konstantin > > On Apr 4, 2:15 pm, "James Earl" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm pretty new to python and django. I hav

Accessing custom model methods from template

2007-04-04 Thread James Earl
Hi, I'm pretty new to python and django. I have a list of items that I'm displaying, and each item can have zero, one or many images. I want to display the first image if one exists. I soon found out that I can't do stuff like test: item.images.all().count() in the templates, so I thought I'd