V
V
vikholodov2018-04-25 22:08:39
Django
vikholodov, 2018-04-25 22:08:39

Why doesn't python see the list?

A POST request comes with a QueryDict, which contains 'parameter': ['1-1', '2-4'], I try to parse it:
for i in request.POST['parameter'], but for some reason python sees only the last element '2-4', what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rostislav Grigoriev, 2018-04-25
@vikholodov

request.POST.getlist('parameter')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question