装饰器可以要求视图只接受特定的请求方法。用法如下:. from django.views.decorators.http import require_http_methods @require_http_methods(["GET", "POST"]) def ...
確定! 回上一頁