def blog_post(request):
print("Processing {} request from {} for the HTTP service: {}, ua: {}".format(
request.method, get_ip(request), request.url, request.user_agent
))
data = build_dict(request)
post_id = data.get('post_id')
post = MemoryDb.get_post(post_id, get_ip(request))
if not post:
return Response('{"error":"Post with ID not found: ' + post_id + '"}', status=404)
return post
################################################################################
# POST /api/blog
# { blog post data... }
#
blog_api.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录