<s> from . import api <EOL> from . views import show <EOL> from django . conf import settings <EOL> from django . http import Http404 <EOL> class URLRouterFallbackMiddleware ( object ) : <EOL> def process_response ( self , request , response ) : <EOL> if response . status_code != <NUM_LIT> : <EOL> return response <EOL> try : <EOL> new_response = show ( request , request . path_info ) <EOL> if hasattr ( new_response , '<STR_LIT>' ) and callable ( new_response . render ) : <EOL> new_response = new_response . render ( ) <EOL> return new_response <EOL> except Http404 : <EOL> return response <EOL> except : <EOL> if settings . DEBUG : <EOL> raise <EOL> return response </s>
