Dondariadmin (トーク | 投稿記録) |
Dondariadmin (トーク | 投稿記録) 細 |
||
28行目: | 28行目: | ||
@ajax_required(HttpResponseBadRequest()) | @ajax_required(HttpResponseBadRequest()) | ||
def index(request): | def index(request): | ||
− | + | # any code | |
== 確認 == | == 確認 == |
from django.http import HttpResponseBadRequest from utils.decorators import ajax_required @ajax_required(HttpResponseBadRequest()) def index(request): # any code
$ curl --head http://localhost:5000/app/index/ HTTP/1.1 200 OK ...
$ curl --head http://localhost:5000/app/index/ HTTP/1.1 400 Bad Request ...Tweet