Jay, Many thanks for this. As a recent newbie to Django and Python could you give me a steer what I would need to do to make this tag. (I familiar with making tags and filters, but can't see how I can use a tag to solve this problem.)
MerMer Jay Parlar wrote: > On 11/10/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > >> When you iterate over a dictionary, you're iterating over the *keys* >> in the dictionary, not the values. >> >> ie. >> >> In [1]: x = {"a":1, "b":2} >> >> In [2]: for each in x: >> ...: print each >> ...: >> ...: >> a >> b >> >> According to a comment by Adrian on the template documentation page, >> what you want isn't possible without writing a simple tag or filter. >> >> Jay P. >> >> > > And after posting, it occurred to me you could try this: > > {% for item in campaigns.values %} > {{item.id}} > {% endfor %} > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---