diango中三种response对象的方法

HttpResponse('xxxx')  # 返回字符串   Content-Type: text/html; charset=utf-8
render(request,'模板的路径',{})   # 返回一个页面
redirect('路径')   # 重定向  状态码301 302  响应头 Location:路径


from django.http.response import JsonResponse
原文地址:https://www.cnblogs.com/-xct/p/12069445.html