def post(self):
# We set the same parent key on the 'Greeting' to ensure each greeting
# is in the same entity group. Queries across the single entity group
# are strongly consistent. However, the write rate to a single entity
# group is limited to ~1/second.
guestbook_name = self.request.get('guestbook_name')
greeting = Greeting(parent=guestbook_key(guestbook_name))
if users.get_current_user():
greeting.author = users.get_current_user().nickname()
greeting.content = self.request.get('content')
greeting.put()
memcache.delete('{}:greetings'.format(guestbook_name))
self.redirect('/?' +
urllib.urlencode({'guestbook_name': guestbook_name}))
评论列表
文章目录