I would convert your dictionary to a list of tuples. IE, in your views.py code
studentTuples = [(student, dictionary.student.id) for student in students] Now in your template, to print out lines containing: student name: student id you can do this: {% for studentTuple in studentTuples %} {{studentTuple.0}} {{studentTuple.1}} {% endfor %} Margie On Aug 18, 8:48 am, elminio <wgruszczyn...@gmail.com> wrote: > I iterate through all students and have distionary containing students > ids as key and for example grade as a value. I pass this dictionary to > the view and then while iterating through all students I though that > it would be simple to get appropriate value for current student. I > dont know how I could make it simplier in template :/ If You think so > maybe any ideas? but please with sample code --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---