Ah, ok; I see what you want to do. I'm not aware of any way to do this, other than as you mentioned a custom template tag.
On 11/7/2011 2:04 PM, bax...@gretschpages.com wrote: > > On Nov 7, 3:50 pm, Nikolas Stevenson-Molnar <nik.mol...@consbio.org> > wrote: >> Assuming obj is iterable, you can do: {% with >> obj.0.thingobj.get_something as thing %} >> >> ...is that what you mean? > Not exactly, no. In my particular case, it's more of a check to see if > it's available, and if not, do a bit more work to get something that > will fill the current need. Or, in other words, maybe I'm storing it > locally, or maybe I'm not. > > Another example: > > {% with firstof obj.votes obj.get_votes as votes %} > Which would then let me do something with votes: "There have been > {{ votes }} vote{{ votes|pluralize }}. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.