Help with django filters
Posted
by Cato Johnston
on Stack Overflow
See other posts from Stack Overflow
or by Cato Johnston
Published on 2010-05-29T04:03:18Z
Indexed on
2010/05/29
4:12 UTC
Read the original article
Hit count: 302
django
|django-templates
In a django template, I want to get an value from the first object in a list's field.
I have the following code
{{ list.object|first.field }}
But it results in an error.
Is there a way to achieve this without writing a loop or doing it in the view?
© Stack Overflow or respective owner