how to obtain all values of a multi-valued key from Django's request.GET QueryDict

后端 未结 7 951
花落未央
花落未央 2021-02-07 04:11

The Django docs say at http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.iteritems thatQueryDict.iteritems() uses the same last-value

7条回答
  •  臣服心动
    2021-02-07 05:02

    request.META['QUERY_STRING']
    

    will give the complete query string

    or if you want to get the list of values for a given key ex: list of values for status then

    request.GET.getlist('status')
    

提交回复
热议问题