开发者

Reference ID in GAE

开发者 https://www.devze.com 2023-01-06 00:58 出处:网络
I have a feeling the answer is simple and documented, but I\'m absolutely mis开发者_运维知识库sing it:

I have a feeling the answer is simple and documented, but I'm absolutely mis开发者_运维知识库sing it:

Is there a way, using Python and webapp through Google App Engine, to pass the id field of a record to the template? I'm fairly new to the app engine, and yes, I have searched all around the Google Documentation to find this.


I can reference it through record.key().id(). I just found this RIGHT AFTER I posted this question (as luck would have it). Sorry for wasting anybody's time.


Assuming you're using the built-in Django 0.96 templates, you can access the ID (assuming the entity has one; it might have a key name instead if you saved it with one) with {{entity.key.id}}.

0

精彩评论

暂无评论...
验证码 换一张
取 消