Django学习-4-request获取数据

app下views.py
            获取前端HTML数据的一些方法
            def func(request):
                # request.method   GET / POST
                
                # http://127.0.0.1:8009/home?nid=123&name=cqcq
                # request.GET.get('username',None)   # 获取请求发来的而数据
   # u = request.POST.get("username",None) 
# obj = request.FILES.get("file")
# FILE_PATH = os.path.join("uploda", obj.name)
# f = open(FILE_PATH, mode="wb")
# for i in obj.chunks():
# f.write(i)
# f.close()
                # return HttpResponse("字符串")
                # return render(request, "HTML模板的路径")
                # return redirect('/只能填URL')
上一篇:SNMP-配置文件详解


下一篇:HDU3530 子序列