In a Django request I have the following:
POST:<QueryDict: {u'section': [u'39'], u'MAINS': [u'137']}>
How do I get the values of section and MAINS?
if request.method == 'GET':
qd = request.GET
elif request.method == 'POST':
qd = request.POST
section_id = qd.__getitem__('section') or getlist....
You can use
[]to extract values from aQueryDictobject like you would any ordinary dictionary.