处理一个Django post请求一个值被赋值,而另一个赋值失败不知道原因

2024-05-29 03:40:06 发布

您现在位置:Python中文网/ 问答频道 /正文

正在尝试从html中发送一个简单的帖子。。在

当我在django中收到请求时,我只执行print post请求。(计数没有反映在我的输出中邓诺y…)

        print "counterUpdate"
    print request.method
    print request.path
    print request.POST.get
    print "Expects data of counts in next line console print but it is empty"
    countValues=request.POST['counts'] # counts is not getting reflected in my output dunno y..
    updateType=request.POST['key']
    print countValues
    print updateType
    print "dddd1"
    for data in request.POST:
        print data
    print "Iteration Over"

为了以下目的:

^{pr2}$

Tags: djangoindataisrequesthtmlpost帖子

热门问题