Пример #1
0
 def on_post(self, req, resp):
     article = Article.create(req)
     if article:
         key = article.put()
         resp.status = falcon.HTTP_200
         resp.body = json.dumps({'key': key.urlsafe()})
     else:
         resp.status = falcon.HTTP_400
         resp.body = "400 Bad Request."