Merge pull request #21 from johtso/nonflat-formdata

Put multiple form data values with same key into lists
This commit is contained in:
Kenneth Reitz
2011-12-07 17:55:11 -08:00
+7
View File
@@ -85,6 +85,13 @@ def get_dict(*keys, **extras):
if not form.values().pop():
data = form.keys().pop()
form = None
if form:
nonflat_dict = form.to_dict(flat=False)
for k, v in nonflat_dict.items():
if len(v) == 1:
nonflat_dict[k] = v[0]
form = nonflat_dict
d = dict(
url=request.url,