I am building a blog using GAE. i would like to delete specific posts stored in datastore with the ID key.My code being..
#my db model
class Post(db.Model):
subject = db.StringProperty(required = True)
content = db.TextProperty(required = True)
created = db.DateTimeProperty(auto_now_add = True)
lastmodified = db.DateTimeProperty(auto_now = True)
#my delete post handler
class DeletePost(Bloghandler):
def post(self):
key = self.request.get('id')
#my html form which passes the ID of the entity.
<form method="post" class="button-link" action="http://localhost:8080/blog/delete">
<input type="hidden" name="id" value={{p.Key().id()}}>
<input type="submit" name="delete" value="Delete">
</form><br><br>
there was a similar post to delete entities which had involved blobstore, that made it quite difficult for me to follow and implement. Any help would be greatly appreciated!:)