0
我有这样的谷歌应用程序引擎Python代码,谷歌应用程序引擎:实体ID不显示
class ABC(db.Model):
StringA = db.StringProperty()
abcs = ABC.all()
template_values = {'abcs': abcs,}
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))
,这在index.html的,
<script type="text/javascript">
{% for abc in abcs %}
var id = "{{ abc.ID }}"; // needed the entity ID, the abc.ID doesn't show??
{% endfor %}
</script>
什么是正确的关键字用于实体ID,abc.ID?
在此先感谢。
Hi Wooble,{{abc.key.id}}有效。谢谢。 – Peter 2011-01-07 04:35:09