Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support multivalues in FormParser

  • Loading branch information...
commit 07efe72af45876f83c02bc9a2e03a6f5c01ecd25 1 parent f912bf1
@klen authored
Showing with 5 additions and 3 deletions.
  1. +3 −1 .travis.yml
  2. +1 −1  Makefile
  3. +1 −1  adrest/utils/parser.py
View
4 .travis.yml
@@ -12,4 +12,6 @@ branches:
install:
- pip install -IM pylama
-script: make test
+script:
+ - make audit
+ - make test
View
2  Makefile
@@ -19,7 +19,7 @@ upload: doc
python setup.py sdist upload || echo 'Upload already'
.PHONY: test
-test: audit
+test:
python setup.py test
.PHONY: audit
View
2  adrest/utils/parser.py
@@ -24,7 +24,7 @@ class FormParser(BaseParser):
@staticmethod
def parse(request):
- return dict(request.POST.iteritems())
+ return dict((k, v if len(v) > 1 else v[0]) for k, v in request.POST.iterlists())
class JSONParser(BaseParser):
Please sign in to comment.
Something went wrong with that request. Please try again.