Pak Partana Pak Partana -4 years ago 155
Python Question

From webapp2 to Flask

I am trying to find an equivalent to:

self.request.get_all("value")
(from webapp2)

on flask, the fact is i'm very new to flask and web development. I cant find anything similar on flasks documentation

Answer Source

To get all values for a particular key in the request, use getlist:

request.args.getlist('value')

request.args returns a MultiDict object, as documented here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download