In correcting a small design flaw in this blog's software I ever-so-slightly reduced the amount of code used.
So instead of this potentially unreliable method of retrieving entities:
qry = models.BlogPost.all() qry.filter('uri = ', blog_uri) blog_post = qry.get()
we now just do this:
blog_post = models.BlogPost.get_by_id(int(id))
id comes to the request handler via GET parameter.
id is auto-generated by App Engine, there was no need to alter the model :-)
Thanks for reading.
moc hezky, that's pretty good reduction from 3 lines only 1, good job :-)
Comments are now closed for this post.