<s> from django . conf import settings <EOL> from django import http <EOL> class XViewMiddleware ( object ) : <EOL> """<STR_LIT>""" <EOL> def process_view ( self , request , view_func , view_args , view_kwargs ) : <EOL> """<STR_LIT>""" <EOL> if request . method == '<STR_LIT>' and ( request . META . get ( '<STR_LIT>' ) in settings . INTERNAL_IPS or <EOL> ( request . user . is_active and request . user . is_staff ) ) : <EOL> response = http . HttpResponse ( ) <EOL> response [ '<STR_LIT>' ] = "<STR_LIT>" % ( view_func . __module__ , view_func . __name__ ) <EOL> return response </s>
