def shortcircuitmiddleware(f):
    """ view decorator, the sole purpose to is 'rename' the function
    '_shortcircuitmiddleware' """

def _shortcircuitmiddleware(*args, **kwargs):
    return f(*args, **kwargs)
return _shortcircuitmiddleware


class ShortCircuitMiddleware(object):
    pass
Неглобальное промежуточное ПО в Django