Hi Jason,
1) Django-developers is a mailing list for discussing the development
of django itself, not for general user queries. Questions like this
one should be asked on django-users.
2) Given that your question is about Google App Engine, you may have
more luck asking in discussion group specific to App Engine. There are
some subtle differences between Google App Engine and Django, so an
answer which is completely correct for Django may be incorrect for App
Engine.
Yours,
Russ Magee %-)
Django doesn't do indirect lookups like that. The thing after the dot in
{{{ data.attribute }} has to be the name of an attribute, not the name
of a variable that is used to look up the name of an attribute. You
could write a filter to do the indirect lookup for you (I believe there
might even be one in djangosnippets.org), but almost always you'll find
the cleaner solution is not to construct your data that way.
In this case, you can just as easily write:
{% for name,value in data.items %}
...
{% endfor %}
Alternatively, you could make data be a list of tuples (which would be a
better data structure if you want the results in a well-defined order,
since dictionary orderings will change as you add more things).
Regards,
Malcolm
Malcolm
Thanks for the replies, everyone. I double-checked my message to make
sure it would be clear. Wonderful! And yet, I posted to the wrong
group :( If I have a follow-up I'll post in the users forum or the
Google App Engine forum.