<s> from django . http import HttpResponseRedirect <EOL> from neurovault . apps . statmaps . utils import HttpRedirectException <EOL> class CollectionRedirectMiddleware : <EOL> def process_exception ( self , request , exception ) : <EOL> if isinstance ( exception , HttpRedirectException ) : <EOL> return HttpResponseRedirect ( exception . args [ <NUM_LIT:0> ] ) </s>
