In my example "reportdatedate" is a datetime object. "result" is a
dict of dicts.

The lines that attempt to access the dict cause a template syntax
error ( because I invented the syntax myself ) - is there an
alternative that means the same thing?

I note that Django templates give me an obvious syntax when the dict-
key names are known in advance: {{ mydict.keyname }}, but what do I do
when (as in my example below) the key names are provided by another
variable?

Thanks

{% for reportdate in allDates %}
        <tr>
                <td>
                {{ reportdate }}
                </td>
                {{ result[ reportdate ][ "dev" ] }}
                <td>
                <td></td>
                <td>
                {{ result[ reportdate ][ "live" ] }}
                </td>
        </tr>
{% 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to