From dfa29161e2eff676eb4aa187f76c157556dfc5db Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 16 Jun 2011 16:34:46 +0000 Subject: Fixed #14020 -- Made the `HttpResponse` class slightly more behave like a dictionary, allowing the alternative argument to be unset. Serious thanks to schmichael and moopet. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16417 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/http/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/http/__init__.py b/django/http/__init__.py index 7f198a7b08..2a88ee1950 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -615,7 +615,7 @@ class HttpResponse(object): def items(self): return self._headers.values() - def get(self, header, alternate): + def get(self, header, alternate=None): return self._headers.get(header.lower(), (None, alternate))[1] def set_cookie(self, key, value='', max_age=None, expires=None, path='/', -- cgit v1.3