#NEWLINE# def __getstate__( self ) : #NEWLINE# #INDENT# "Pickling support function.\n\n        Ensures that the object can't be pickled before it has been\n        rendered, and that the pickled state only includes rendered\n        data, not the data used to construct the response.\n        " #NEWLINE# obj_dict = self . __dict__ . copy ( ) #NEWLINE# if ( not self . _is_rendered ) : #NEWLINE# #INDENT# raise ContentNotRenderedError ( 'The response content must be rendered before it can be pickled.' ) #NEWLINE# #UNINDENT# for attr in self . rendering_attrs : #NEWLINE# #INDENT# if ( attr in obj_dict ) : #NEWLINE# #INDENT# del self [ attr ] #NEWLINE# #UNINDENT# #UNINDENT# return obj_dict