<s> import logging <EOL> from django . conf import settings <EOL> from piston . emitters import Emitter , DjangoEmitter <EOL> logger = logging . getLogger ( "<STR_LIT>" ) <EOL> DEFAULT_CHARSET = getattr ( settings , '<STR_LIT>' , '<STR_LIT:utf-8>' ) <EOL> class ROADjangoEmitter ( DjangoEmitter ) : <EOL> """<STR_LIT>""" <EOL> def render ( self , request ) : <EOL> response = super ( ROADjangoEmitter , self ) . render ( request , '<STR_LIT>' ) <EOL> logger . debug ( u"<STR_LIT>" % str ( response ) . decode ( DEFAULT_CHARSET ) ) <EOL> return response <EOL> Emitter . register ( '<STR_LIT>' , ROADjangoEmitter , '<STR_LIT>' ) <EOL> class CustomDjangoEmitter ( DjangoEmitter ) : <EOL> """<STR_LIT>""" <EOL> def render ( self , request ) : <EOL> response = super ( CustomDjangoEmitter , self ) . render ( request , '<STR_LIT>' ) <EOL> logger . debug ( u"<STR_LIT>" % response . decode ( DEFAULT_CHARSET ) ) <EOL> return response <EOL> Emitter . register ( '<STR_LIT>' , CustomDjangoEmitter , '<STR_LIT>' ) </s>
