小编ven*_*enj的帖子

如何在Google App Engine Python的请求处理程序中使用delete()方法

在GAE Python中,我可以使用

class MyRequestHandler(webapp.RequestHandler):
    def get(self):
        pass #Do Something...
    def post(self):
        pass #Do Something...
Run Code Online (Sandbox Code Playgroud)

处理GET和POST请求.但是我如何处理DELETE和PUT?我在API文档中看到了delete()和put(),但我不知道如何编写表单来模拟DELETE和PUT.

我知道在Rails中,我可以使用post方法在表单中使用隐藏字段来模拟这样的请求:

<input type="hidden" name="_method" value="delete" />
Run Code Online (Sandbox Code Playgroud)

和Rails自动处理脏工作.

在GAE python中有没有类似的方法呢?

我在谷歌搜索过这个,但没有运气.

谢谢.

python google-app-engine

7
推荐指数
1
解决办法
1966
查看次数

如何使用颜色渐变笔划绘制圆形路径

我想在iOS和macOS上绘制一个带有颜色渐变笔画的圆圈,如下图所示:

圆路径

是否可以用/ CAShapeLayer或?还是其他任何方式?NSBezierPathCGPath

macos cashapelayer ios nsbezierpath swift

6
推荐指数
2
解决办法
7744
查看次数