python - Django: Handling several page parameters -


i have several possible parameter process in page. assume x0, x1, x2,..., x1000. seems awkward , process them 1 one request.get.get('x0'), request.get.get('x1'), ...

any idea put them in list, can processed in loop.

since, request.get dictionary, can access values this:

for var in request.get:     value = request.get[var]     # value ... 

or if want put values in list:

val_list = [] var in request.get:     var_list.append(request.get[var]) 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -