Why is Django not sending the response to status code 302?
I see two different codes, 302 and 200. With response ok
and redirected: true
instead of 302.
I am trying to do a hard redirect to the home page with 302 code.
@csrf_protect
def new_form(request):
if not request.user.is_authenticated:
response = HttpResponse(status=302)
response['Location'] = 'http://192.168.1.200:9000/'
return response