Refs #32902 -- Moved ensure_csrf_cookie_view after protected_view.
This commit is contained in:
parent
a2e1f1e295
commit
3cfcb8cbc8
|
@ -38,6 +38,11 @@ def protected_view(request):
|
||||||
return HttpResponse('OK')
|
return HttpResponse('OK')
|
||||||
|
|
||||||
|
|
||||||
|
@ensure_csrf_cookie
|
||||||
|
def ensure_csrf_cookie_view(request):
|
||||||
|
return HttpResponse('OK')
|
||||||
|
|
||||||
|
|
||||||
@csrf_protect
|
@csrf_protect
|
||||||
@ensure_csrf_cookie
|
@ensure_csrf_cookie
|
||||||
def ensured_and_protected_view(request):
|
def ensured_and_protected_view(request):
|
||||||
|
@ -62,12 +67,6 @@ def post_form_view(request):
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
@ensure_csrf_cookie
|
|
||||||
def ensure_csrf_cookie_view(request):
|
|
||||||
# Doesn't insert a token or anything.
|
|
||||||
return HttpResponse()
|
|
||||||
|
|
||||||
|
|
||||||
def token_view(request):
|
def token_view(request):
|
||||||
context = RequestContext(request, processors=[csrf])
|
context = RequestContext(request, processors=[csrf])
|
||||||
template = Template('{% csrf_token %}')
|
template = Template('{% csrf_token %}')
|
||||||
|
|
Loading…
Reference in New Issue