<s> """<STR_LIT>""" <EOL> from django . utils . html import strip_spaces_between_tags as short <EOL> from treeio . core . conf import settings <EOL> def _minify_json ( data ) : <EOL> "<STR_LIT>" <EOL> import json <EOL> return json . dumps ( json . loads ( data ) ) <EOL> class SpacelessMiddleware ( object ) : <EOL> "<STR_LIT>" <EOL> def process_response ( self , request , response ) : <EOL> "<STR_LIT>" <EOL> if '<STR_LIT>' in response [ '<STR_LIT:Content-Type>' ] : <EOL> response . content = short ( response . content ) <EOL> if settings . HARDTREE_MINIFY_JSON and settings . HARDTREE_RESPONSE_FORMATS [ '<STR_LIT>' ] in response [ '<STR_LIT:Content-Type>' ] : <EOL> response . content = _minify_json ( response . content ) <EOL> return response </s>
