1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +00:00

Fixed #23730 -- Moved support for SimpleCookie HIGHEST_PROTOCOL pickling to http.cookie.

This fix is necessary for Python 3.5 compatibility (refs #23763).

Thanks Berker Peksag for review.
This commit is contained in:
Tim Graham
2014-10-31 14:26:27 -04:00
parent 4e9a6c94e6
commit 42b5e4feea
4 changed files with 34 additions and 15 deletions

View File

@@ -39,7 +39,7 @@ class SimpleTemplateResponse(HttpResponse):
rendered, and that the pickled state only includes rendered
data, not the data used to construct the response.
"""
obj_dict = super(SimpleTemplateResponse, self).__getstate__()
obj_dict = self.__dict__.copy()
if not self._is_rendered:
raise ContentNotRenderedError('The response content must be '
'rendered before it can be pickled.')