I'm attempting to get the first and last items in a set inside a
django template. The first is no problem:
{{ course.coursepart_set.all.0.begin_date }}
but I can't figure out how to get the last item without knowing the
length of the set. Is there a way to do this?
Something like (theoretically):
{{ course.coursepart_set.all.LAST.end_date }}
kind regards,
-raymond
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---