<s> import json <EOL> import logging <EOL> from rest_framework import renderers <EOL> logger = logging . getLogger ( __name__ ) <EOL> class PlainTextRenderer ( renderers . BaseRenderer ) : <EOL> """<STR_LIT>""" <EOL> media_type = '<STR_LIT>' <EOL> format = '<STR_LIT>' <EOL> def render ( self , data , accepted_media_type = None , renderer_context = None ) : <EOL> if isinstance ( data , ( dict , list , tuple , set , frozenset ) ) : <EOL> data = json . dumps ( data ) <EOL> return str ( data ) . encode ( self . charset ) <EOL> class ZipRenderer ( renderers . BaseRenderer ) : <EOL> """<STR_LIT>""" <EOL> media_type = '<STR_LIT>' <EOL> format = '<STR_LIT>' <EOL> charset = None <EOL> render_style = '<STR_LIT>' <EOL> def render ( self , data , accepted_media_type = None , renderer_context = None ) : <EOL> return data </s>
