On 7/24/07, drkfce <[EMAIL PROTECTED]> wrote: > > Is there any possible way to have the first loop just display the key?
Sure - you just need to walk through the data correctly. Your context contains the `switch_info`, which is a list of dictionaries. When you print {% for item in switch_info %} {{ item }} {% endfor %} each `item` is a dictionary - hence, when you print {{ item }}, you get a dictionary printed. So, walk through the key-values pairs of each `item` dictionary so that you end up with a loop variable that is a single string (the key from the dictionary). {% for item in switch_info %} {% for label in item %} {{ label }} {% endfor %} {% endfor %} It doesn't matter that each 'item' only has one key - iterating over a list of one is still iterating. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---