diff --git a/django/http/__init__.py b/django/http/__init__.py index 74a4eff55c..ca3b5eab24 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -121,9 +121,9 @@ class QueryDict(MultiValueDict): self._assert_mutable() MultiValueDict.update(self, other_dict) - def pop(self, key): + def pop(self, key, *args): self._assert_mutable() - return MultiValueDict.pop(self, key) + return MultiValueDict.pop(self, key, *args) def popitem(self): self._assert_mutable() diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py index c8016bc5bd..e7245104e9 100644 --- a/tests/regressiontests/httpwrappers/tests.py +++ b/tests/regressiontests/httpwrappers/tests.py @@ -166,6 +166,9 @@ True >>> q.pop('foo') ['bar', 'baz', 'another', 'hello'] +>>> q.pop('foo', 'not there') +'not there' + >>> q.get('foo', 'not there') 'not there'