views:

32

answers:

1

How to decode the values from request from django FW.

GET:<QueryDict: {}>,
POST:<QueryDict: {u'objarrid': [u'1035', u'1036', u'1037', u'1038', u'1039', u'1040', u'1041', u'1042']}>,

def get_data(request):
  try:
    if request.method == 'GET':
      r_c = request.GET
    elif request.method == 'POST':
      r_c = request.POST
  except:
    dict.update({'ret_status' :  1})

Decode all values of query dict

+1  A: 

Use .getlist('objarrid').

Daniel Roseman